title: PHP Laravel Multiple returns
body: <p>hello i have this function </p>
  
  <pre><code>//Get Total Number of Personal Leads By User ID &amp; Requested week Through Each Day
  //Get Total Number of Personal Leads By User ID &amp; Requested week Through Each Day
  $personalleads = \DB::table('leads') 
  -&gt;where('owned_by_id', $id) // User ID
  -&gt;where('lead_source_id', 7) // 7 = Personal Lead
  -&gt;whereBetween('created_at', [$weeks[$week]]) // get week through GET request &amp; Query the data
  -&gt;select(\DB::raw('DATE(created_at) as date'), \DB::raw('count(*) as pleads'))
  -&gt;groupBy('date')
  -&gt;get(); // Get All Data
  
  //Get Total Number of leads Created by Managers By User ID &amp; Requested week Through Each Day
  $managerleads = \DB::table('leads') 
  -&gt;where('owned_by_id', $id) // User ID
  -&gt;where('lead_source_id', 3) // 3 = Manager Lead
  -&gt;whereBetween('created_at', [$weeks[$week]]) // get week through GET request &amp; Query the data
  -&gt;select(\DB::raw('DATE(created_at) as date'), \DB::raw('count(*) as mleads'))
  -&gt;groupBy('date')
  -&gt;get(); // Get All Data
  
  //Get Total Number of leads Created by Admins By User ID &amp; Requested week Through Each Day
  $adminleads = \DB::table('leads') 
  -&gt;where('owned_by_id', $id) // User ID
  -&gt;where('lead_source_id', 4) // 4 = Admin Lead
  -&gt;whereBetween('created_at', [$weeks[$week]]) // get week through GET request &amp; Query the data
  -&gt;select(\DB::raw('DATE(created_at) as date'), \DB::raw('count(*) as aleads'))
  -&gt;groupBy('date')
  -&gt;get(); // Get All Data
  </code></pre>
  
  <p>i want to return the data of all of them
  like </p>
  
  <pre><code>return $adminleads+personalleads+managerleads;
  </code></pre>
  
  <p>i know this is invalid but i want to display all data at once
  this is the output i get when i return $personalleads only</p>
  
  <blockquote>
    <p>[{"date":"2019-02-10","pleads":1},{"date":"2019-02-12","pleads":1},{"date":"2019-02-14","pleads":1}]  </p>
  </blockquote>
  
  <p>how can i make it something like </p>
  
  <blockquote>
    <p>[{"date":"2019-02-10","pleads":1,"aleads":1,"mleads":1},{"date":"2019-02-12","pleads":1,"aleads":1,"mleads":1},{"date":"2019-02-14","pleads":1,"aleads":1,"mleads":1}]  </p>
  </blockquote>
  
  <p>Thank you very much </p>