Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Illuminate\Tests\Integration\Http\Fixtures; use Illuminate\Http\Resource..
Decoded Output download
<?php
namespace Illuminate\Tests\Integration\Http\Fixtures;
use Illuminate\Http\Resources\Json\JsonResource;
class PostResourceWithUnlessOptionalData extends JsonResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'first' => $this->unless(false, 'value'),
'second' => $this->unless(true, 'value'),
'third' => $this->unless(true, function () {
return 'value';
}),
'fourth' => $this->unless(false, 'value', 'default'),
'fifth' => $this->unless(false, 'value', function () {
return 'default';
}),
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\Integration\Http\Fixtures;
use Illuminate\Http\Resources\Json\JsonResource;
class PostResourceWithUnlessOptionalData extends JsonResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'first' => $this->unless(false, 'value'),
'second' => $this->unless(true, 'value'),
'third' => $this->unless(true, function () {
return 'value';
}),
'fourth' => $this->unless(false, 'value', 'default'),
'fifth' => $this->unless(false, 'value', function () {
return 'default';
}),
];
}
}
Function Calls
None |
Stats
MD5 | 4cd56a7b3d4686591c3320525a4c7e23 |
Eval Count | 0 |
Decode Time | 120 ms |