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 App\Http\Resources; use App\Values\Genre; use Illuminate\Http\Resources\..
Decoded Output download
<?php
namespace App\Http\Resources;
use App\Values\Genre;
use Illuminate\Http\Resources\Json\JsonResource;
class GenreResource extends JsonResource
{
public function __construct(private Genre $genre)
{
parent::__construct($genre);
}
/** @return array<mixed> */
public function toArray($request): array
{
return [
'type' => 'genres',
'name' => $this->genre->name,
'song_count' => $this->genre->songCount,
'length' => $this->genre->length,
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Http\Resources;
use App\Values\Genre;
use Illuminate\Http\Resources\Json\JsonResource;
class GenreResource extends JsonResource
{
public function __construct(private Genre $genre)
{
parent::__construct($genre);
}
/** @return array<mixed> */
public function toArray($request): array
{
return [
'type' => 'genres',
'name' => $this->genre->name,
'song_count' => $this->genre->songCount,
'length' => $this->genre->length,
];
}
}
Function Calls
| None |
Stats
| MD5 | c30dce4dfaf27d8eb09bf3df3f80f591 |
| Eval Count | 0 |
| Decode Time | 109 ms |