How can I do a Like-query, with multiple values to search for?
$searchWords = explode(' ', Input::get('search'));
Then I get an array of words that were given for the search.
How can I pass it in this:
$pages = Page::where('content', 'LIKE', '%'.$singleWord.'%')->distinct()->get();
A loop can't work, then it overwrites the $pages always; then it keeps always the latest search:
foreach($searchWords as $word){
$pages = Page::where('content', 'LIKE', '%'.$word.'%')->distinct()->get();
}