misc_pterodactyl-panel/app/Transformers/Api/Client/EggTransformer.php

28 lines
490 B
PHP
Raw Permalink Normal View History

<?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;
}
/**
* @return array
*/
public function transform(Egg $egg)
{
return [
'uuid' => $egg->uuid,
'name' => $egg->name,
];
}
}