title: Laravel Eloquent hasMany\hasOne limit parents to children with records
body: <p>Using Laravel Eloquent and a hasOne()\hasMany() relationship, is it possible to limit the "parent" table to only retrieve results if a "child\foreign" relationship exists?</p>
  
  <p><strong>FOOS</strong></p>
  
  <pre><code>+----+------------+
  | id |     etc    |
  +----+------------+
  |  1 |     one    |
  |  2 |     two    |
  |  3 |     three  |
  |  4 |     four   |
  +----+------------+
  </code></pre>
  
  <p><strong>BARS</strong></p>
  
  <pre><code>+----+-----+--------+
  | id | val | foo_id |
  +----+-----+--------+
  | 11 | 101 |      1 |
  | 12 | 102 |      2 |
  | 13 | 203 |      3 |
  | 14 | 204 |      4 |
  +----+-----+--------+
  </code></pre>
  
  <p>in Foo class (model)</p>
  
  <pre><code>public function highBars(){
      return $this-&gt;hasOne('App\Bar')-&gt;where('val','&gt;','200');
  }
  </code></pre>
  
  <p>in controller</p>
  
  <pre><code>Foo::with('highBars')-&gt;get();
  </code></pre>
  
  <p>returns ALL the FOOS, even though some <code>high_bars</code> relationships are null.
  Is it possible to only include FOOS results with a relationship value not null? (foos.id = 3,4)</p>
  
  <p>This is retrieved...</p>
  
  <pre><code>  0 =&gt; array:3 [▼
      "id" =&gt; 1
      "etc" =&gt; "one"
      "high_bars" =&gt; null
    ]
    1 =&gt; array:3 [▼
      "id" =&gt; 2
      "etc" =&gt; "two"
      "high_bars" =&gt; null
    ]
    2 =&gt; array:3 [▼
      "id" =&gt; 3
      "etc" =&gt; "three"
      "high_bars" =&gt; array:2 [▼
        "id" =&gt; 13
        "val" =&gt;203
        "foo_id" =&gt;3
      ]
    ]
    3 =&gt; array:3 [▼
      "id" =&gt; 4
      "etc" =&gt; "four"
      "high_bars" =&gt; array:2 [▼
        "id" =&gt; 14
        "val" =&gt;204
        "foo_id" =&gt;4
      ]
    ]
  </code></pre>
  
  <p>But this is what I want..</p>
  
  <pre><code>0 =&gt; array:3 [▼
      "id" =&gt; 3
      "etc" =&gt; "three"
      "high_bars" =&gt; array:2 [▼
        "id" =&gt; 13
        "val" =&gt;203
        "foo_id" =&gt;3
      ]
    ]
    1 =&gt; array:3 [▼
      "id" =&gt; 4
      "etc" =&gt; "four"
      "high_bars" =&gt; array:2 [▼
        "id" =&gt; 14
        "val" =&gt;204
        "foo_id" =&gt;4
      ]
    ]
  </code></pre>