title: how to get 2 table data into single variable array in laravel?
body: <p>i have 2 tables User and subadmin consider user have 3 columns and subadmin has 2 column i want to get  3+2 (5 column) data into a single veriable array</p>
  <p>the technique i want to use is that in user table i have id which is same in subadmin table with sub_admin_id(column) how i can use eloquent model to first link id with sub_admin_id and then into a single query get 5 column in single veriable array</p>
  <p>here i am using to get data</p>
  <pre><code>$subadmindata = User::find($id)-&gt;get(); // [column1 ,column2 ,column3 ]
  $subadmindata1 = SubAdmin::find($id)-&gt;get(); // [column1 ,column2 ]
  </code></pre>
  <p><strong>output should be</strong></p>
  <pre><code>$data = // [column1 ,column2 ,column3 , column4 ,column5 ]
  </code></pre>
  <p>note i dont want to use array merge or combine method i want to use eloquent model for my learning</p>