title: How to merge two table data in laravel?
body: <p>I need all users data in one blade, I have <code>table1</code> and <code>table2</code>.</p>
  
  <p><strong>table1</strong></p>
  
  <pre><code>'id','name','phone','email','status','created_at'
  </code></pre>
  
  <p><strong>table2</strong></p>
  
  <pre><code>'id','name','mobile','email','status','created_at'
  </code></pre>
  
  <p>I tried to do this but not an expected result.</p>
  
  <pre><code> $usersTbl = DB::table('table1')-&gt;select('id','name','phone','email','status','created_at')-&gt;groupBy('phone')-&gt;paginate(20);
  
   $ordersTbl = DB::table('table2')-&gt;select('id','name','mobile','email','status','created_at')-&gt;groupBy('mobile')-&gt;paginate(20);
  
   $items=$ordersTbl-&gt;merge($usersTbl);
   dd($items);exit;
  </code></pre>