misc_pterodactyl-panel/app/Transformers/Api/Application/AdminRoleTransformer.php
2021-08-07 13:25:06 -07:00

23 lines
505 B
PHP

<?php
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\AdminRole;
use Pterodactyl\Transformers\Api\Transformer;
class AdminRoleTransformer extends Transformer
{
public function getResourceName(): string
{
return AdminRole::RESOURCE_NAME;
}
public function transform(AdminRole $model): array
{
return [
'id' => $model->id,
'name' => $model->name,
'description' => $model->description,
];
}
}