/** * Display a listing of the resource. * * @return Response */ public function index() { $lists = Apartment::searchByQuery(["bool" => ['must' => ['multi_match' => ['query' => Input::get('query', ''), 'fields' => ["name^6", "pincode^5", "address_line1^4", "address_line2^3", "address_line3^2", "city", "state", "country"]]], "should" => ['match' => ['city' => ["query" => Input::get('query', ''), "type" => "phrase"]]]]]); return view('apartments.search', compact('lists')); }