title: Convert an array of array onto Collection Laravel
body: <p>I have an array of array which results from several sql requests. 
  First I make a sql request in a foreach in order to have all the datas i need </p>
  
  <pre><code>foreach ($users as $user) {
     // Two different Eloquent requests 
     $todo = User::select().....where('users.id' = $id);
     $done = User::select().....where('users.id' = $id);
  
     // I have operation on Collection that work fine ... 
     $totalTimes = $todo-&gt;toBase()-&gt;sum('dureeformation') ;
     $spendTimes = $done-&gt;toBase()-&gt;sum('dureeformation') ;
     $remainingTimes = $totalTimes - $spendTimes;
  
    $all[] = ['user_id' =&gt; $id, 'totalTime' =&gt; $totalTimes, 'spendTime' =&gt; $spendTimes,'remainingTime' =&gt; $remainingTimes ];
  
  }
  </code></pre>
  
  <p>My issue is the following... Outside the foreach i display the values and i have this array of array ... </p>
  
  <pre><code>array:16 [▼
    0 =&gt; array:4 [▼
      "user_id" =&gt; 1
      "totalTime" =&gt; 465
      "spendTime" =&gt; 0
      "remainingTime" =&gt; 465
    ]
    1 =&gt; array:4 [▼
      "user_id" =&gt; 3
      "totalTime" =&gt; 375
      "spendTime" =&gt; 0
      "remainingTime" =&gt; 375
    ]
  </code></pre>
  
  <p>I would need to have a Collection instead ... I tried to make $all = Collect(....) but i doesn't give me the expected result. </p>
  
  <p>I need a collection because i have to create a Collection with this created collection and another one from another request. </p>
  
  <p>Concerning this part i already had this case and i can solve it. </p>
  
  <p>Thanks for your help</p>