misc_pterodactyl-panel/app/Transformers/Api/Client/EggTransformer.php
2022-12-14 17:05:46 -07:00

25 lines
502 B
PHP

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