title: Method whereHas does not exist
body: <p>I've got 2 tables which have relationships using Eloquent of which I'm attempting to <strong>filter</strong> based on requests.</p>
  
  <pre><code>+----------+---------+
  | Table 1            |
  +----------+---------+
  | id       | rl_id   |
  +----------+---------+
  | 39       | 2       |
  | 40       | 234     |
  | 41       | 345     |
  +----------+---------+
  
  +----------+---------+
  | Table 2 - rl       |
  +----------+---------+
  | id       | type    |
  +----------+---------+
  | 2        | Hel..   |
  | 234      | Umb...  |
  | 345      | Pot.    |
  +----------+---------+
  </code></pre>
  
  <p>I've got 2 Models:</p>
  
  <pre><code>Class Listing extends Model {
  
      protected $table = 'listings';
  
      public function rocketleague()
      {
          return $this-&gt;belongsToMany('App\Models\RocketLeague');
      }
  
  }
  
  Class Game extends Model {
  
      protected $table = 'games';
  
      public function listings()
      {
          return $this-&gt;hasMany('App\Models\Listing');
      }
  
  }
  
  Class RocketLeague extends Model {
  
      protected $table = 'rl_items';
  
  }
  </code></pre>
  
  <p>How I'm getting the error is via this:</p>
  
  <pre><code>$game = Game::find($game_id);
  $game-&gt;listings = Listing::where('game_id', $game_id)-&gt;get();
  
  //I perform a filter here based on request
  $type = "Hel...";
  $game-&gt;listings-&gt;whereHas('rocketleague', function($q) use($type) {
      $q-&gt;where('type', $type);
  })-&gt;get();
  </code></pre>
  
  <p>And then I'm being given the following upon the query being performed:</p>
  
  <pre><code>(1/1)BadMethodCallException
  Method whereHas does not exist.
  </code></pre>