columns(3) ->components([ Section::make('Bausteine') ->description('Die Seite besteht aus Bausteinen. Reihenfolge per Ziehen, Inhalte je Baustein. Wie sie aussehen, bestimmt das Theme.') ->columnSpan(2) ->schema([ Builder::make('sections') ->hiddenLabel() ->blocks(fn (): array => app(SectionRegistry::class)->blocks()) ->addActionLabel('Baustein hinzufügen') ->collapsible() ->collapsed() ->cloneable() ->blockNumbers(false) ->blockPickerColumns(2), ]), Section::make('Seite') ->columnSpan(1) ->schema([ Hidden::make('site_id')->default(fn (): ?int => Site::query()->where('is_default', true)->value('id') ?? Site::query()->value('id')), TextInput::make('title')->label('Titel')->required()->maxLength(120), TextInput::make('slug') ->label('Adresse') ->prefix('/') ->helperText('Die Startseite heißt „start“.') ->required() ->alphaDash() ->maxLength(80) ->disabled(fn (?Page $record): bool => $record?->isHome() ?? false) ->dehydrated() ->unique(ignoreRecord: true, modifyRuleUsing: fn (Unique $rule, callable $get) => $rule->where('site_id', $get('site_id'))), TextInput::make('menu_label')->label('Name im Menü (optional)')->maxLength(60), Select::make('menu_location')->label('Menü')->options(Page::MENU_LOCATIONS)->default('main')->required(), Toggle::make('is_published')->label('Veröffentlicht')->default(true), ]), Section::make('Suchmaschinen') ->columnSpan(1) ->collapsed() ->schema([ TextInput::make('seo_title')->label('Seitentitel (Google)')->maxLength(70), Textarea::make('seo_description')->label('Beschreibung (Google)')->rows(3)->maxLength(170), ]), ]); } }