Initial commit
This commit is contained in:
57
app/Filament/Resources/Sizes/Schemas/SizeForm.php
Normal file
57
app/Filament/Resources/Sizes/Schemas/SizeForm.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user