Files
nutzwerte_fi4/app/Filament/Resources/Helps/Schemas/HelpForm.php
T
2025-11-05 18:07:50 +01:00

33 lines
966 B
PHP

<?php
namespace App\Filament\Resources\Helps\Schemas;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
class HelpForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('kennung'),
TextInput::make('titel'),
Textarea::make('description'),
FileUpload::make('image')
->image()
->label('Bild')
->preserveFilenames()
->disk('public')
->maxSize(3072) // 3MB limit
->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp'])
->directory('gutachten_hilfe')
->visibility('public')
->columnSpanFull(),
])->columns(1);
}
}