schema([ Select::make('owner') ->label('Owner') ->options(Bidders::all()->pluck('bidder_assigned_number', 'idbidders')) ->searchable(), TextInput::make('year') ->label('Year'), TextInput::make('make') ->label('Make'), TextInput::make('model') ->label('Model'), Select::make('type') ->label('Type') ->options(CarShowCategory::orderBy('category_name')->vehtype()->pluck('category_name', 'id')) ->searchable(), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('vehicleOwner.bidder_assigned_number') ->label('Number') ->sortable(), TextColumn::make('year') ->label('Year') ->sortable(), TextColumn::make('make') ->label('Make') ->sortable(), TextColumn::make('model') ->label('Model') ->sortable(), TextColumn::make('vehicleType.category_name') ->label('Type') ->sortable(), BooleanColumn::make('doNotJudge') ->label('Judged?') ->sortable() ->falseIcon('heroicon-o-badge-check') ->trueIcon('heroicon-o-x-circle') ->trueColor('danger') ->falseColor('success'), TextColumn::make('vehicleOwner.bidder_fname') ->label('First Name') ->sortable(), TextColumn::make('vehicleOwner.bidder_lname') ->label('Last Name') ->sortable(), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\DeleteBulkAction::make(), ]); } public static function getRelations(): array { return [ RelationManagers\CarShowWinnerRelationManager::class, RelationManagers\VehicleOwnerRelationManager::class, RelationManagers\VehicleScoresRelationManager::class, RelationManagers\VehicleTypeRelationManager::class, ]; } public static function getPages(): array { return [ 'index' => Pages\ListVehicles::route('/'), 'create' => Pages\CreateVehicles::route('/create'), 'edit' => Pages\EditVehicles::route('/{record}/edit'), ]; } }