diff --git a/app/Filament/Resources/PeoplesChoiceResource.php b/app/Filament/Resources/PeoplesChoiceResource.php index 6b63b18..b85a64e 100644 --- a/app/Filament/Resources/PeoplesChoiceResource.php +++ b/app/Filament/Resources/PeoplesChoiceResource.php @@ -12,10 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; -use Filament\Tables\Columns\BooleanColumn; use Filament\Tables\Columns\TextColumn; use Filament\Forms\Components\TextInput; -use Filament\Forms\Components\Toggle; +use App\Models\Vehicles; +use Filament\Forms\Components\Select; class PeoplesChoiceResource extends Resource { @@ -31,7 +31,11 @@ class PeoplesChoiceResource extends Resource { return $form ->schema([ - // + Select::make('vehicle') + ->label('Vehicle') + ->options(Vehicles::all()->pluck('owner', 'id')) + ->searchable(), + TextInput::make('pc_count'), ]); } @@ -39,7 +43,11 @@ class PeoplesChoiceResource extends Resource { return $table ->columns([ - // + TextColumn::make('pc_count')->label('PC Vote Count'), + TextColumn::make('awardVehicle.owner')->label('Vehicle Number'), + TextColumn::make('awardVehicle.year')->label('Year'), + TextColumn::make('awardVehicle.make')->label('Make'), + TextColumn::make('awardVehicle.model')->label('Model'), ]) ->filters([ //