user()->can('ver categoria'); } public static function form(Form $form): Form { return $form ->schema([ Forms\Components\TextInput::make('nombre') ->required() ->maxLength(255), Forms\Components\Textarea::make('descripcion') ->columnSpanFull(), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('nombre') ->searchable(), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('updated_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->paginated(true) //->paginationPageOptions([50]) ->defaultSort('created_at', 'desc') ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListCategorias::route('/'), 'create' => Pages\CreateCategoria::route('/create'), 'edit' => Pages\EditCategoria::route('/{record}/edit'), ]; } }