Initial commit
This commit is contained in:
31
app/Filament/Resources/Photos/Schemas/PhotoForm.php
Normal file
31
app/Filament/Resources/Photos/Schemas/PhotoForm.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
17
app/Filament/Resources/Photos/Schemas/PhotoInfolist.php
Normal file
17
app/Filament/Resources/Photos/Schemas/PhotoInfolist.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photos\Schemas;
|
||||
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class PhotoInfolist
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
//
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user