Add tables for almost every admin change, update composer dependencies

This commit is contained in:
Matthew Penner 2021-01-05 14:52:49 -07:00
parent 8f1a5bf0ab
commit 59de9576c9
42 changed files with 3327 additions and 1241 deletions

View file

@ -0,0 +1,38 @@
<?php
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\Mount;
class MountTransformer extends BaseTransformer
{
/**
* Return the resource name for the JSONAPI output.
*
* @return string
*/
public function getResourceName(): string
{
return Mount::RESOURCE_NAME;
}
/**
* Return a transformed Mount model that can be consumed by external services.
*
* @param \Pterodactyl\Models\Mount $model
* @return array
*/
public function transform(Mount $model): array
{
return [
'id' => $model->id,
'uuid' => $model->uuid,
'name' => $model->name,
'description' => $model->description,
'source' => $model->source,
'target' => $model->target,
'read_only' => $model->read_only,
'user_mountable' => $model->user_mountable,
];
}
}