title: laravel eloquent multiple where statement
body: <p>I have used the following code for conditional where query. But I didnt get the result in foreach statement but if I use $member->first() I am getting the result. Is this the correct way to use conditional where in laravel?</p>
  
  <pre><code>$member = Member:query();
   if(!empty($param['activity'])){
                  $member-&gt;where('activity', 'LIKE', $param['activity'] .'%');
              }
              if(!empty($param['MemberName'])){
                  $member-&gt;where('MemberName', 'LIKE', $param['MemberName'] .'%');
              }
              if(!empty($param['Designation'])){
                  $member-&gt;where('Designation', 'LIKE', $param['Designation'] .'%');
              }
      $member-&gt;take(100)-&gt;skip($offset)-&gt;get();
      foreach ($member as $arr)
              {
      ....
      }
  </code></pre>