Files
nutzwerte_fi4/app/Filament/Resources/Inhaltsverzeichnis/Schemas/InhaltsverzeichnisForm.php
T
2025-10-11 09:10:12 +02:00

28 lines
838 B
PHP

<?php
namespace App\Filament\Resources\Inhaltsverzeichnis\Schemas;
use App\Models\TextblockKennung;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
class InhaltsverzeichnisForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('ordnungszahl')->numeric(),
Select::make('textblock_kennung_id')
->label('Textblock Art')
->options(function () {
$relatedOptions = TextblockKennung::all()->pluck('name', 'id')->toArray();
return ['0' => 'ohne Textblock'] + $relatedOptions;
}),
TextInput::make('name'),
])->columns(1);
}
}