title: Laravel - Where Clause not working
body: <p>I am trying to build a search form with laravel, but I cannot get the where clause to work.<br><br></p>
  
  <pre><code>$term = $request-&gt;input('term');
  
  $count = DB::table('members as m')
           -&gt;where(DB::raw('m.member_first_name'), 'LIKE', "%$term%")
           -&gt;orWhere(DB::raw('m.member_last_name'), 'LIKE', "%$term%")
           -&gt;orWhere(DB::raw('m.member_business_address'), 'LIKE', "%$term%")
           -&gt;orWhere(DB::raw("concat('m.member_first_name',' ','m.member_last_name')"), 'LIKE', "%$term%")
           -&gt;orWhere(DB::raw("concat('m.member_last_name',' ','m.member_first_name')"), 'LIKE', "%$term%")
           -&gt;orWhere(DB::raw("concat('m.member_name_affix',' ','m.member_last_name',' ','m.member_first_name')"), 'LIKE', "%$term%")
           -&gt;orWhere(DB::raw("concat('m.member_first_name',' ','m.member_name_affix',' ','m.member_last_name')"), 'LIKE', "%$term%")
           -&gt;count();
  
  var_dump($count);
  </code></pre>
  
  <p><br><br>
  <strong>var_dump($count) always returns all the database entries</strong>, no matter what the search term is.<br><br><hr>
  This is my first Laravel project and I would be very thankful for any kind of help.</p>