schema([ TextInput::make('name') ->translateLabel() ->required() ->maxLength(255), Select::make('type') ->translateLabel() ->required() ->options([ 'game' => __('Game'), 'literature' => __('Literature'), 'item' => __('Item') ]), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('name') ->label('Name') ->translateLabel() ->searchable(), TextColumn::make('type') ->label('Type') ->translateLabel() ->searchable(), ]) ->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\ListCategories::route('/'), 'create' => Pages\CreateCategory::route('/create'), 'edit' => Pages\EditCategory::route('/{record}/edit'), ]; } public static function canViewAny(): bool { return auth()->user()->is_admin==true; } }