veh score rel mgr

This commit is contained in:
Russ Long 2023-03-16 13:37:56 -04:00
parent 0d73255ee8
commit a49bb5e218

View File

@ -9,6 +9,8 @@ use Filament\Resources\Table;
use Filament\Tables; use Filament\Tables;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope; use Illuminate\Database\Eloquent\SoftDeletingScope;
use App\Models\Vehicles;
use App\Models\Judges;
class VehicleScoresRelationManager extends RelationManager class VehicleScoresRelationManager extends RelationManager
{ {
@ -20,9 +22,16 @@ class VehicleScoresRelationManager extends RelationManager
{ {
return $form return $form
->schema([ ->schema([
Forms\Components\TextInput::make('id') Forms\Components\Select::make('judge')
->required() ->label('Judge')
->maxLength(255), ->options(Judges::all()->pluck('judge_number', 'id'))
->searchable(),
Forms\Components\Select::make('vehicle')
->label('Vehicle')
->options(Vehicles::all()->pluck('owner', 'id'))
->searchable(),
Forms\Components\TextInput::make('overall_score')
->label('Overall Score'),
]); ]);
} }