title: Laravel multiple where clauses in query from given array
body: <p>I hope the title describes my problem good as enough.
  I tried to make a geosearch-function in laravel. The queries as its own are correct. Now I try to get all articles from my table, whose match with the gotten zipcode of a former query. All functions I use you can found here: <a href="https://stackoverflow.com/questions/33511113/laravel-5-add-results-from-query-in-a-foreach-to-array">Laravel 5 add results from query in a foreach to array</a>). But now I want to perform one query, within multiple or dynamic where clauses (with or).
  The <code>print_r($zipcodes)</code> of my former query (get all zipcodes in a range from a zipcode <code>$zipcodes = $this-&gt;getZipcodes($zipCoordinateId, $distance);</code>) outputs:</p>
  
  <pre><code>Array
  (
  [0] =&gt; stdClass Object
      (
          [zc_zip] =&gt; 13579
          [distance] =&gt; 0
      )
  
  [1] =&gt; stdClass Object
      (
          [zc_zip] =&gt; 12345
          [distance] =&gt; 2.228867736739
      )
  
  [2] =&gt; stdClass Object
      (
          [zc_zip] =&gt; 98765
          [distance] =&gt; 3.7191570094844
      )
  )
  </code></pre>
  
  <p>So how should my query in laravel should look, when I want to perform following?</p>
  
  <pre><code>SELECT *
  FROM articles
  WHERE zipcode = '13579'
  OR zipcode = '98765'
  OR zipcode = '12345';
  </code></pre>
  
  <p>Thank you in advance,
  quantatheist</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>With the solution from balintant this is working fine. Here is my code:</p>
  
  <pre><code>// grabs all zipcodes matching the distance
  $zipcodes = $this-&gt;getZipcodes($zipCoordinateId, $distance);
  
  foreach ($zipcodes AS $key=&gt;$val)
  {
      $zipcodes[$key] = (array) $val;
  }
  
  $codes = array_column($zipcodes, 'zc_zip');
  
  $articles = Article::whereIn('zipcode', $codes)-&gt;get();
  
  return view('pages.intern.articles.index', compact('articles'));
  </code></pre>