title: Laravel join use to get one to many relations?
body: <p>Is there any way to get relational data ( one to many relation records ) using joins in laravel without creating different records in collection :</p>
  
  <p>Example:</p>
  
  <pre><code> $orders  = DB::table('orders')
                       -&gt;join('users', 'users.id', '=', 'orders.users_id')
                       -&gt;join('order_items', 'order_items.order_id', '=', 'orders.id')
                       -&gt;select('users.*', 'order_items.*')
                       -&gt;get();
  </code></pre>
  
  <p>So here what's happening is that its creating 6 records if order has 6 items but i want something like single records in which it has array or collection where are order items are listed.</p>
  
  <p>Output I want is generally of this order:</p>
  
  <pre><code>Collection {# ▼
    #items: array:[▼
            0 =&gt; {
              +'id':1,
                ...,
              + 'items: [
                       //here i want all the records of relation order items
             ]
        }
   ]
  }
  </code></pre>
  
  <p>Is there any way to achieve this result without using <strong>with()</strong> or <strong>load()</strong> and just only with joins or raw queries?</p>