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\ExcerptSearchResult; use Illuminate\H..

Decoded Output download

<?php

namespace App\Http\Resources;

use App\Values\ExcerptSearchResult;
use Illuminate\Http\Resources\Json\JsonResource;

class ExcerptSearchResource extends JsonResource
{
    public function __construct(private ExcerptSearchResult $result)
    {
        parent::__construct($result);
    }

    /** @return array<mixed> */
    public function toArray($request): array
    {
        return [
            'songs' => SongResource::collection($this->result->songs),
            'artists' => ArtistResource::collection($this->result->artists),
            'albums' => AlbumResource::collection($this->result->albums),
        ];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Http\Resources;

use App\Values\ExcerptSearchResult;
use Illuminate\Http\Resources\Json\JsonResource;

class ExcerptSearchResource extends JsonResource
{
    public function __construct(private ExcerptSearchResult $result)
    {
        parent::__construct($result);
    }

    /** @return array<mixed> */
    public function toArray($request): array
    {
        return [
            'songs' => SongResource::collection($this->result->songs),
            'artists' => ArtistResource::collection($this->result->artists),
            'albums' => AlbumResource::collection($this->result->albums),
        ];
    }
}

Function Calls

None

Variables

None

Stats

MD5 41d33fdf8b2f13ae18323e47bc7d705e
Eval Count 0
Decode Time 101 ms