title: Return multiple array to Response::json laravel?
body: <p>How we can return multiple array in json.
  Suppose we get the following response in Laravel eloquent:</p>
  
  <pre><code>$user= User::all();
  $post= Post::all();
  $comment= Comment:all();
  </code></pre>
  
  <p>Now I want to return response in json which include these data:</p>
  
  <pre><code>Response::json(array('user'=&gt;$user,'post'=&gt;$post,'comment'=&gt;$comment));
  </code></pre>
  
  <p>Using the above method empty value is returned. Any help would be appreciated</p>
  
  <p>Sorry guys. I found the solution. The data that I was passing was already in object form. Therefore I needed to convert it into an array and then pass it.</p>
  
  <pre><code>$user= User::all()-&gt;toArray();
  $post= Post::all()-&gt;toArray();
  $comment= Comment:all()-&gt;toArray();
  </code></pre>
  
  <p>Now it will work!</p>