This is continuity form the previous post https://dev.to/nasrulhazim/laravel-scout-create-a-single-api-endpoint-for-searching-purpose-only-1bj4. I was asked if it is possible, if we create a Global Search?
The route: get('/search', function (Request $request) { abort_if( empty($request->search), 404, 'Please provide search keyword' ); return search($request); }); Enter fullscreen mode And the helper: type); $keyword = $request->search; $paginate = $request->query('paginate', false); $types = empty($type)?