SELECT *
FROM table_name
WHERE
CONCAT(id,name, address) LIKE \'%same_string%\'
What is an alternate query for this in Laravel
** Laravel - The general search in multiple columns the in single input
**
one of the user table in the first name, last name, job title column available and I have one input search in any value enter then find all column in associated data fetch and display
$searchQuery = trim($request->query('search'));
$requestData = ['firstname', 'lastname', 'job_title'];
$user = User::where(function($q) use($requestData, $searchQuery) {
foreach ($requestData as $field)
$q->orWhere($field, 'like', "%{$searchQuery}%");
})->get();