mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 22:44:46 +02:00
25 lines
444 B
PHP
25 lines
444 B
PHP
<?php
|
|
|
|
namespace App\Transformers\Api\Client;
|
|
|
|
use App\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,
|
|
];
|
|
}
|
|
}
|