title: Querying database with an array of related objects in laravel
body: <p>I would like to query some offers by skills from my database with laravel.</p>
  
  <p>The relationship between an offer and its skills is a belongsToMany relationship.</p>
  
  <p>How to get all offers that match an array of skills from the database ?</p>
  
  <p>To be clearer here is some code I started to write : </p>
  
  <pre><code>        $skills = Input::get('skills');
          $offers = Offer::with(
              array(
                  'skills' =&gt; function($query){
                      // here I'd like to select skills from array $skills
                      $query-&gt;where(?????);
                  }
              )
          )-&gt;get();
  </code></pre>
  
  <p>Thanks in advance !</p>