From a2f3b2c380cdb27e95c19994277814a63e1432c4 Mon Sep 17 00:00:00 2001 From: Russ Long Date: Thu, 16 Mar 2023 13:29:39 -0400 Subject: [PATCH] veh owner rel mgr form --- .../RelationManagers/VehicleOwnerRelationManager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php index 8e72f36..61fc4e8 100644 --- a/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php +++ b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php @@ -9,6 +9,7 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use App\Models\Bidders; class VehicleOwnerRelationManager extends RelationManager { @@ -20,9 +21,14 @@ class VehicleOwnerRelationManager extends RelationManager { return $form ->schema([ - Forms\Components\Select::make('bidder_assigned_number') + Forms\Components\Select::make('owner') ->label('Number') ->required() + ->searchable() + ->options( + Bidders::orderBy('bidder_assigned_number') + ->pluck('bidder_assigned_number', 'idbidders' + )) ->createOptionForm([ Forms\Components\TextInput::make('bidder_fname')->label('First Name'), Forms\Components\TextInput::make('bidder_lname')->label('Last Name'),