components([ TextInput::make('platform') ->label('Platforma') ->required() ->placeholder('Instagram'), TextInput::make('url') ->label('URL') ->required(), FileUpload::make('icon') ->label('Ikony (PNG / SVG / WebP)') ->image() ->disk('public') ->directory('social-icons') ->nullable(), TextInput::make('sort_order') ->label('Tertip') ->required() ->numeric() ->default(0), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('platform') ->label('Platforma') ->searchable(), ImageColumn::make('icon') ->label('Ikony') ->circular() ->disk('public') ->size(32), TextColumn::make('url') ->label('URL') ->searchable(), 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' => ManageSocialLinks::route('/'), ]; } }