title: Laravel Eloquent LEFT JOIN WHERE NULL
body: <p>I'm trying to use Eloquent to perform the following query during a database seed:</p>
  
  <pre><code>SELECT
      *
  FROM
      customers
  LEFT JOIN
      orders
      ON customers.id = orders.customer_id
  WHERE
      orders.customer_id IS NULL
  </code></pre>
  
  <p>And here is my implementation in Eloquent:</p>
  
  <pre><code>$c = Customer::leftJoin('orders', function($join) {
        $join-&gt;on('customers.id', '=', 'orders.customer_id');
      })
      -&gt;whereNull('orders.customer_id')
      -&gt;first();
  </code></pre>
  
  <p>Whereas the first query always returns full results, the Eloquent equivalent always returns empty elements for everything but the <code>email</code> and <code>phone</code> fields of the <code>customers</code> table. I'm at a loss to explain this since the <code>Customers</code> and <code>Orders</code> models are both artisan generated skeletons.</p>
  
  <p>Ex:</p>
  
  <pre><code>class Customer extends \Eloquent {
  
      // Add your validation rules here
      public static $rules = [
          // 'title' =&gt; 'required'
      ];
  
      // Don't forget to fill this array
      protected $fillable = [];
  
  }
  </code></pre>
  
  <p>Here is the array that is output when I dd() the first Eloquent query on a seed (generated originally by Faker):</p>
  
  <pre><code>protected $original =&gt;
    array(25) {
      'id' =&gt;
      NULL
      'first_name' =&gt;
      NULL
      'last_name' =&gt;
      NULL
      'email' =&gt;
      string(24) "luther.braun@example.org"
      'phone' =&gt;
      string(17) "642.150.9176x5684"
      'address1' =&gt;
      NULL
      'address2' =&gt;
      NULL
      'city' =&gt;
      NULL
      'state' =&gt;
      NULL
      'county' =&gt;
      NULL
      'district' =&gt;
      NULL
      'postal_code' =&gt;
      NULL
      'country' =&gt;
      NULL
      'notes' =&gt;
      NULL
      'created_at' =&gt;
      NULL
      'updated_at' =&gt;
      NULL
      'customer_id' =&gt;
      NULL
      'total' =&gt;
      NULL
  }
  </code></pre>