I have an action method which has in its body multiple Variables something like this :-
$bus=Bus::all();
$user=User::all();
$employer=employer::all();
what am doing to return those variables objects to the view is using code like this
return view('create')->with(compact('bus', $bus))->with(compact('user', $user))->with(compact('employer', $employer));
is there a way a method or something to return this objects at once without the need for all of this code some thing like
return view('create')->($user,$bus,$emp);
just example of what i want .
return view('create', compact('bus', 'user', 'employer'));