title: laravel search multiple words separated by space
body: <p>I am new to laravel query builder, I want to search multiple words entered in an input field for example if I type "jhon doe" I want to get any column that contains jhon or doe</p>
  
  <p>I have seen/tried solutions using php MySQL but can't able to adapt to query builder</p>
  
  <pre><code>//1. exploding the space between the keywords 
  
  //2. using foreach apend the query together
  
  $query = "select * from users where";
  
  $keywordRaw = "jhon doe";
  $keywords = explode(' ', $keywordRaw );
  foreach ($keywords as $keyword){
  $query.= " first_name LIKE '%" + $keyword +"%' OR ";
  }
  </code></pre>
  
  <p>how do I do this using query builder</p>
  
  <p>this is what i have so far, what is the proper way of doing this, </p>
  
  <pre><code>$keywordRaw = "jhon doe";
  //how do I explode this words and append them along with their appropriate query
  $users = User::select('users.*')
  -&gt;where('first_name', 'LIKE', '%'.$keywordRaw.'%')
  </code></pre>
  
  <p>please help, thanks in advance</p>