components(static::getForm()); } public static function getForm(): array { return [ TextInput::make('name') ->label(__('Name')) ->required() ->maxLength(255) ->helperText(__('Use :hotel for dynamic hotel name')), Textarea::make('content') ->label(__('Content')) ->rows(8) ->helperText(__('Use :hotel for dynamic hotel name. Use
for line breaks.')), TextInput::make('image_url') ->label(__('Image URL')) ->maxLength(255), TextInput::make('button_text') ->label(__('Button Text')) ->maxLength(255), TextInput::make('button_url') ->label(__('Button URL')) ->maxLength(255), ColorPicker::make('button_color') ->label(__('Button Color')), ColorPicker::make('button_border_color') ->label(__('Button Border Color')), Toggle::make('small_box') ->label(__('Small Box')) ->helperText(__('Show as small box on the right side')), TextInput::make('position') ->label(__('Position')) ->numeric() ->default(0), ]; } #[\Override] public static function table(Table $table): Table { return $table ->columns(static::getTable()); } public static function getTable(): array { return [ TextColumn::make('id') ->label(__('ID')) ->sortable(), TextColumn::make('name') ->label(__('Name')) ->searchable(), TextColumn::make('button_text') ->label(__('Button Text')), ToggleColumn::make('small_box') ->label(__('Small Box')), TextColumn::make('position') ->label(__('Position')) ->sortable(), ]; } #[\Override] public static function getPages(): array { return [ 'index' => ListHelpQuestionCategories::route('/'), 'create' => CreateHelpQuestionCategory::route('/create'), 'edit' => EditHelpQuestionCategory::route('/{record}/edit'), ]; } }