laravel compact()
return more than one array then use compact('array1', 'array2', 'array3', ...) to return view.
return view('viewblade', compact('view1','view2','view3','view4'));
On the other hand, you can use
with()
:
return View:('viewblade')
->with(compact('view1','view2','view3','view4'));
by გიორგი ბაკაშვილი
4 years ago
Laravel
1
Pro tip: use ```triple backticks around text``` to write in code fences