32 lines
864 B
PHP
32 lines
864 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Photos\Schemas;
|
|
|
|
use Filament\Forms\Components\FileUpload;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class PhotoForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('name')
|
|
->label('Nazwa')
|
|
->required()
|
|
->maxLength(2048),
|
|
TextInput::make('description')
|
|
->label('Opis')
|
|
->maxLength(2048)
|
|
->default(null),
|
|
FileUpload::make('photo')
|
|
->image()
|
|
->imageEditor()
|
|
->disk('public')
|
|
->directory('photos')
|
|
->label('Zdjęcie'),
|
|
]);
|
|
}
|
|
}
|