peopleschoice setup

This commit is contained in:
Russ Long 2022-08-07 13:17:10 -04:00
parent 0ba081bb8c
commit e5b7b58cc8

View File

@ -12,10 +12,10 @@ 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 Filament\Tables\Columns\BooleanColumn;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle; use App\Models\Vehicles;
use Filament\Forms\Components\Select;
class PeoplesChoiceResource extends Resource class PeoplesChoiceResource extends Resource
{ {
@ -31,7 +31,11 @@ class PeoplesChoiceResource extends Resource
{ {
return $form return $form
->schema([ ->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 return $table
->columns([ ->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([ ->filters([
// //