. */ namespace App\Http\Controllers\Api\Web; use Illuminate\Http\Request; use App\Http\Controllers\ApiControllerBase; use App\Library\Search; use Elasticsearch; 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); } }