misc_pterodactyl-panel/app/Transformers/Api/Client/EggTransformer.php
Matthew Penner cbcf62086f
Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00

24 lines
460 B
PHP

<?php
namespace Pterodactyl\Transformers\Api\Client;
use Pterodactyl\Models\Egg;
class EggTransformer extends BaseClientTransformer
{
/**
* Return the resource name for the JSONAPI output.
*/
public function getResourceName(): string
{
return Egg::RESOURCE_NAME;
}
public function transform(Egg $egg): array
{
return [
'uuid' => $egg->uuid,
'name' => $egg->name,
];
}
}