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