Files
nutzwerte_fi4/app/Filament/Clusters/Verwaltung/Helps/Schemas/HelpForm.php
T
2026-05-13 10:10:48 +02:00

33 lines
976 B
PHP

<?php
namespace App\Filament\Clusters\Verwaltung\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);
}
}