title: Laravel 5.1 Dynamic where / orWhere
body: <p>I want to build a dynamic where / orWhere statment like this.</p>
  
  <pre><code>$matchList = [ 'match1', 'match2', 'match3', 'match4' ];
  
  $query-&gt;where('Column', 'Like', 'match1')
  -&gt;orWhere('Column', 'Like', 'match2')
  -&gt;orWhere('Column', 'Like', 'match3')
  -&gt;orWhere('Column', 'Like', 'match4');
  </code></pre>
  
  <p>I tried to build a dynamic method call, but it dosent work ...</p>
  
  <pre><code> $matchList = [ 'match1', 'match2', 'match3', 'match4' ];
  
        $query-&gt;where('Column', 'Like', $hobbiesList[0]);
  
        if(count($matchList) &gt; 1)
        {
            for($i = 1; $i &lt; count($matchList); $i++)
            {
                $query-&gt;{orWhere('Column', 'Like', $matchList[$i])}();
            }
        }
  </code></pre>
  
  <p>The problem is I got a match list and for this list I must build a dynamic query statement in Larvel 5.1. </p>
  
  <p>Can anyone help me or explain where my mistake is ?</p>