label('Überschrift')->required()->maxLength(160), Textarea::make('text')->label('Text')->rows(2), static::photoSelect('photo_id', 'Hintergrundfoto'), TextInput::make('button_label')->label('Button-Text')->default('Belegung & Preise')->maxLength(60), static::pageSelect('button_page', 'Button führt zu'), ]; } public static function photoSlots(): array { return ['photo_id' => ['label' => 'Hintergrundfoto', 'type' => self::SLOT_SINGLE]]; } public function data(Theme $theme, array $data): array { return [ 'title' => $theme->text('cta.title', $data['title'] ?? null), 'text' => $theme->text('cta.text', $data['text'] ?? null), 'photo' => $this->seasonalPhoto($theme, $data, 'photo_id') ?? (isset($data['photo_id']) ? Photo::find($data['photo_id']) : null), 'buttonLabel' => $data['button_label'] ?? 'Belegung & Preise', 'buttonUrl' => $this->pageUrl($data['button_page'] ?? null) ?? route('booking.create'), ]; } }