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\Models\Artist; use Illuminate\Http\Resources..
Decoded Output download
<?php
namespace App\Http\Resources;
use App\Models\Artist;
use Illuminate\Http\Resources\Json\JsonResource;
class ArtistResource extends JsonResource
{
public function __construct(private Artist $artist)
{
parent::__construct($artist);
}
/** @return array<mixed> */
public function toArray($request): array
{
return [
'type' => 'artists',
'id' => $this->artist->id,
'name' => $this->artist->name,
'image' => $this->artist->image,
'created_at' => $this->artist->created_at,
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Http\Resources;
use App\Models\Artist;
use Illuminate\Http\Resources\Json\JsonResource;
class ArtistResource extends JsonResource
{
public function __construct(private Artist $artist)
{
parent::__construct($artist);
}
/** @return array<mixed> */
public function toArray($request): array
{
return [
'type' => 'artists',
'id' => $this->artist->id,
'name' => $this->artist->name,
'image' => $this->artist->image,
'created_at' => $this->artist->created_at,
];
}
}
Function Calls
| None |
Stats
| MD5 | 0cf84f2d7500385aa8659684040c6c08 |
| Eval Count | 0 |
| Decode Time | 130 ms |