58 lines
2.1 KiB
PHP
58 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Sizes\Schemas;
|
|
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\FileUpload;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Schemas\Components\Grid;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class SizeForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Section::make()
|
|
->schema([
|
|
TextInput::make('small')
|
|
->label('Mały rozmiar (opis)')
|
|
->required()
|
|
->maxLength(2048),
|
|
FileUpload::make('small_photo')
|
|
->image()
|
|
->imageEditor()
|
|
->disk('public')
|
|
->nullable()
|
|
->directory('sizes')
|
|
->label('Zdjęcie (małego rozmiaru)'),
|
|
TextInput::make('medium')
|
|
->label('Średni rozmiar (opis)')
|
|
->required()
|
|
->maxLength(2048),
|
|
FileUpload::make('medium_photo')
|
|
->image()
|
|
->imageEditor()
|
|
->disk('public')
|
|
->nullable()
|
|
->directory('sizes')
|
|
->label('Zdjęcie (średniego rozmiaru)'),
|
|
TextInput::make('large')
|
|
->label('Duży rozmiar (opis)')
|
|
->required()
|
|
->maxLength(2048),
|
|
FileUpload::make('large_photo')
|
|
->image()
|
|
->imageEditor()
|
|
->disk('public')
|
|
->nullable()
|
|
->directory('sizes')
|
|
->label('Zdjęcie (dużego rozmiaru)'),
|
|
])
|
|
->columns(1)
|
|
->columnSpan('full'),
|
|
]);
|
|
}
|
|
}
|