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; class PostResourceWithOption..
Decoded Output download
<?php
namespace Illuminate\Tests\Integration\Http\Fixtures;
class PostResourceWithOptionalRelationshipAggregates extends PostResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'title' => $this->title,
'average_rating' => $this->whenAggregated('comments', 'rating', 'avg'),
'minimum_rating' => $this->whenAggregated('comments', 'rating', 'min'),
'maximum_rating' => $this->whenAggregated('comments', 'rating', 'max', fn ($avg) => "$avg ratings", 'Default Value'),
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\Integration\Http\Fixtures;
class PostResourceWithOptionalRelationshipAggregates extends PostResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'title' => $this->title,
'average_rating' => $this->whenAggregated('comments', 'rating', 'avg'),
'minimum_rating' => $this->whenAggregated('comments', 'rating', 'min'),
'maximum_rating' => $this->whenAggregated('comments', 'rating', 'max', fn ($avg) => "$avg ratings", 'Default Value'),
];
}
}
Function Calls
| None |
Stats
| MD5 | 08a68b0b5dbd4e98b51c69bbb7962e63 |
| Eval Count | 0 |
| Decode Time | 105 ms |