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'),