title: Eloquent relationships for not-existing model class
body: <p>I would like to have in my applications many models/modules but some of them would be removed for some clients. </p>
  
  <p>Now I have such relation:</p>
  
  <pre><code>public function people()
  {
      return $this-&gt;hasMany('People', 'model_id');
  }
  </code></pre>
  
  <p>and when I run <code>$model = Model::with('people')-&gt;get();</code> it is working fine</p>
  
  <p>But what if the <code>People</code> model doesn't exist?</p>
  
  <p>At the moment I'm getting:</p>
  
  <blockquote>
    <p>1/1 ErrorException in ClassLoader.php line 386: include(...): failed
    to open stream: No such file or directory</p>
  </blockquote>
  
  <p>I tried with</p>
  
  <pre><code>public function people()
  { 
      try {
         return $this-&gt;hasMany('People', 'model_id');
      }
      catch (FatalErrorException $e) {
          return null;
      }
  }
  </code></pre>
  
  <p>or with:</p>
  
  <pre><code>public function people()
  { 
      return null; // here I could add checking if there is a Model class and if not return null
  }
  </code></pre>
  
  <p>but when using such method <code>$model = Model::with('people')-&gt;get();</code> doesn't work. </p>
  
  <p>I will have a dozens of relations and I cannot have list of them to use in <code>with</code>. The best method for that would be using some <code>empty relation</code> (returning null) just to make Eloquent not to do anything but in this case Eloquent still tries to make it work and I will get:</p>
  
  <blockquote>
    <p>Whoops, looks like something went wrong.
    1/1 FatalErrorException in Builder.php line 430: Call to a member function 
    addEagerConstraints() on null </p>
  </blockquote>
  
  <p>Is there any simple solution for that?</p>