components([ TextInput::make('year') ->label('Ýyly') ->required() ->numeric() ->minValue(1900) ->maxValue(2100), TextInput::make('title') ->label('Başlyk') ->required(), Select::make('icon') ->label('Ikony (Material Symbol)') ->required() ->default('history') ->options([ 'storefront' => 'storefront — Dükançasy', 'outdoor_grill' => 'outdoor_grill — Tüsse otagy', 'local_shipping' => 'local_shipping — Eltip bermek', 'menu_book' => 'menu_book — Resept kitaby', 'history' => 'history — Taryh', 'star' => 'star — Ýyldyz', 'emoji_events' => 'emoji_events — Baýrak', 'workspace_premium' => 'workspace_premium — Premium', 'factory' => 'factory — Zawod', 'engineering' => 'engineering — Inžinerlik', 'handyman' => 'handyman — Usta', 'lightbulb' => 'lightbulb — Täze pikir', ]), TextInput::make('sort_order') ->label('Tertip') ->required() ->numeric() ->default(0), Textarea::make('body') ->label('Tekst') ->required() ->rows(3) ->columnSpanFull(), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('year') ->label('Ýyly') ->sortable(), TextColumn::make('title') ->label('Başlyk') ->searchable(), TextColumn::make('icon') ->label('Ikony'), TextColumn::make('sort_order') ->label('Tertip') ->numeric() ->sortable(), TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->defaultSort('sort_order') ->filters([]) ->recordActions([ EditAction::make(), DeleteAction::make(), ]) ->toolbarActions([ BulkActionGroup::make([ DeleteBulkAction::make(), ]), ]); } public static function getPages(): array { return [ 'index' => ManageTimelineEntries::route('/'), ]; } }