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

23 lines
424 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Transformers\Api\Client;
use Pterodactyl\Models\Egg;
use Pterodactyl\Transformers\Api\Transformer;
class EggTransformer extends Transformer
{
public function getResourceName(): string
{
return Egg::RESOURCE_NAME;
}
public function transform(Egg $egg): array
{
return [
'uuid' => $egg->uuid,
'name' => $egg->name,
];
}
}