title: Eloquent how to search in relation's values
body: <p>I have the following tables with the following fields:</p>
  
  <p><strong>person</strong>: id, lastname, firstname</p>
  
  <p><strong>phoneboookentry</strong>: id, name</p>
  
  <p>I have the following two models:</p>
  
  <pre><code>class Person extends Eloquent
  {
  
      public static $table = 'personphonebookentries';
  
      public function phonebookentry()
      {
          return $this-&gt;has_one('Phonebookentry', 'id');
      }
  
  }
  </code></pre>
  
  <p>
  
  <pre><code>class Phonebookentry extends Eloquent
  {
       public function person()
      {
          return $this-&gt;belongs_to('Person', 'id');
      }
  
  }
  </code></pre>
  
  <p>I can't figure out how to get all Persons that have a specific firstname OR a specific number.</p>
  
  <p>I've tried :</p>
  
  <pre><code>Person::or_where('firstname', 'LIKE', '_name_')-&gt;phonebookentry()-&gt;or_where('number', '=', '_number_')-&gt;get();
  </code></pre>
  
  <p>I need help on finding out how to get that done :)</p>
  
  <p>Thanks for any help!</p>