public function getSearch(Request $request) { PHPRedis::incr('count_pages'); $searchZone = $request->input('search-zone'); $videos = Video::where('name', 'LIKE', '%' . $searchZone . '%')->where('validated', true)->get(); $searchZoneWords = explode(' ', $searchZone); $videos_by_tag = Video::withAnyTag($searchZoneWords)->get(); $scripts = ['application']; return view('front.overviews')->with(compact('videos', 'searchZone', 'videos_by_tag', 'scripts')); }