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

26 lines
586 B
PHP

<?php
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\Egg;
use Pterodactyl\Models\EggVariable;
use Pterodactyl\Transformers\Api\Transformer;
class EggVariableTransformer extends Transformer
{
/**
* Return the resource name for the JSONAPI output.
*/
public function getResourceName(): string
{
return Egg::RESOURCE_NAME;
}
/**
* Transform egg variable into a representation for the application API.
*/
public function transform(EggVariable $model): array
{
return $model->toArray();
}
}