I just started shifting to Laravel 5 from Symfony and I am wondering how to pass multiple arrays from my controller to my view.
I am trying to use PHP's compact() function but I am unable to properly get them in the view.
$users = Users::all();
$projects = Projects::all();
$foods = Foods::all();
return ('controller.view', compact('users','projects','foods'));
What is the best for me to be able to transfer all these array of objects to my view.
Any help would be greatly appreciated.
Thanks!