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