mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-20 17:49:20 +02:00
29 lines
615 B
PHP
29 lines
615 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Api\Field\Wiki\Image;
|
|
|
|
use App\Contracts\Http\Api\Field\CreatableField;
|
|
use App\Http\Api\Field\Field;
|
|
use App\Http\Api\Schema\Schema;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ImageFileField extends Field implements CreatableField
|
|
{
|
|
final public const string ATTRIBUTE_FILE = 'file';
|
|
|
|
public function __construct(Schema $schema)
|
|
{
|
|
parent::__construct($schema, ImageFileField::ATTRIBUTE_FILE);
|
|
}
|
|
|
|
public function getCreationRules(Request $request): array
|
|
{
|
|
return [
|
|
'required',
|
|
'image',
|
|
];
|
|
}
|
|
}
|