title: SQL Join/LeftJoin Statement Returning Null
body: <p>I'm trying to join two queries with this statement:</p>
  
  <pre><code>$item = Category::where('type', $item)
                -&gt;leftJoin('inventory', 'inventory.id', '=', 'categories.id')
                -&gt;get();
  
  return View::make('general.buy')
                  -&gt;with('items', $item);
  </code></pre>
  
  <p>This is my view (this returns NULL):</p>
  
  <pre><code>@foreach ($items as $item)
    {{ $item-&gt;id }} 
  @endforeach
  </code></pre>
  
  <p><strong>The problem is that if there is no inventory id value equal to the category id field, the query returns the id as NULL.</strong> </p>
  
  <p>Does anyone know why this is happening and how I can solve it? I should also mention that I am new to laravel, so please keep that in mind when rating this question. Thanks in advance!</p>