. */ namespace App\Http\Controllers\Api\Web; use App\Http\Controllers\ApiControllerBase; use App\Library\Search; use Elasticsearch; use Illuminate\Http\Request; use Illuminate\Support\Facades\Response; class SearchController extends ApiControllerBase { public function getSearch(Request $request, Search $search) { $results = $search->searchAllContent($request->query('query')); return response()->json([ 'results' => $results, ], 200); } }