search only live events

This commit is contained in:
merdan 2020-02-01 22:47:51 +05:00
parent 38dab9cdfe
commit 37df6266fd
1 changed files with 3 additions and 1 deletions

View File

@ -107,7 +107,9 @@ class PublicController extends Controller
public function search(SearchRequest $request){
//todo implement with elastick search and scout
$query = $request->get('q');
$events = Event::where('title','like',"%{$query}%")->paginate(10);
$events = Event::onLive()
->where('title','like',"%{$query}%")
->paginate(10);
return view('Bilettm.Public.SearchResults')
->with([