title: Laravel Eloquent - (where) and (where or where or where)
body: <p>I'm working on a search query for my data,
  I want to get only the available rows which are those who have value 0 in <code>is_temp</code> column and if the user send me a search query i would like to search this value in other columns</p>
  
  <p>this is what I have now:</p>
  
  <pre><code>$clients = Company::where('guid',$guid)-&gt;first()
          -&gt;clients()
          -&gt;where('is_temp',0)
          -&gt;orderBy('name', $sort_order)
          -&gt;skip($per_page*($page-1))
          -&gt;take($per_page);
  
  if($search_query != ""){
       $clients = $clients-&gt;orWhere('name','LIKE','%'.$search_query.'%')
                          -&gt;orWhere('email','LIKE','%'.$search_query.'%')
                          -&gt;orWhere('vat_number','LIKE','%'.$search_query.'%')
                          -&gt;orWhere('contact_name','LIKE','%'.$search_query.'%');
  }
  
  $response = [
      'clients' =&gt; $clients-&gt;get() 
  ];
  return response()-&gt;json($response, 200);
  </code></pre>
  
  <p>but when I use it this way I get also the rows that the field <code>is_temp</code> equal to 1
  so I need to use (where) and (where or where or where...)</p>
  
  <p>how do i do that?</p>