mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-29 01:58:56 +02:00
57 lines
1.1 KiB
PHP
57 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Api\Schema\Admin;
|
|
|
|
use App\Http\Api\Field\Admin\Dump\DumpIdField;
|
|
use App\Http\Api\Field\Admin\Dump\DumpLinkField;
|
|
use App\Http\Api\Field\Admin\Dump\DumpPathField;
|
|
use App\Http\Api\Field\Field;
|
|
use App\Http\Api\Include\AllowedInclude;
|
|
use App\Http\Api\Schema\EloquentSchema;
|
|
use App\Http\Resources\Admin\Resource\DumpResource;
|
|
|
|
/**
|
|
* Class DumpSchema.
|
|
*/
|
|
class DumpSchema extends EloquentSchema
|
|
{
|
|
/**
|
|
* Get the type of the resource.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function type(): string
|
|
{
|
|
return DumpResource::$wrap;
|
|
}
|
|
|
|
/**
|
|
* Get the allowed includes.
|
|
*
|
|
* @return AllowedInclude[]
|
|
*/
|
|
public function allowedIncludes(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* Get the direct fields of the resource.
|
|
*
|
|
* @return Field[]
|
|
*/
|
|
public function fields(): array
|
|
{
|
|
return array_merge(
|
|
parent::fields(),
|
|
[
|
|
new DumpIdField($this),
|
|
new DumpPathField($this),
|
|
new DumpLinkField($this),
|
|
],
|
|
);
|
|
}
|
|
}
|