I need to search multiple words in
title column in laravel. Like if i search
tea break then i need to fetch only those rows that title content
break. If any title contain only tea then it will not come on my result. I have added below code but it’s fetch only contain one word row too.
$query->where('title', 'LIKE', "%$search%");
Like if i search
Hello Tea break then fetch only those row that contain all three words. that is
If i search
Hello Tea & break. In this case i will remove the all spacial characters from my code and make below array add on code.
$search =  $search = 'Hello'; $search = 'Tea'; $search = 'break'
Source: Laravel StackOverflow