Du måste kontrollera om $request har nycklarna
Prova
public function index(Request $request)
{
$query = Vehicle::query();
if($request->has('condition')) {
$query->where('condition', $request->condition);
}
if($request->has('make')){
$query->where('make', $request->make);
}
if($request->has('model')) {
$query->where('model', $request->model);
}
if($request->has('year')){
$query->where('year', $request->year);
}
$vehicles = $query->paginate(20);
$conditions = DB::table("conditions")->pluck("name","id");
return view('cars',compact('conditions', 'vehicles'));
}