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 o
$keywordRaw = "jhon doe"; $key = explode(' ',$keywordRaw) $users = User::select('users.*') ->whereIn('first_name',$key);
This would work.the whereIn would search for first name from the keywords you entered.