Created
October 6, 2014 15:32
-
-
Save matiit/4226304cfa144e940091 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function index() | |
{ | |
$query = Input::get('q'); | |
if(!$query) { | |
return View::make('search.index'); | |
} | |
list($listings, $searchedCoords) = $this->searchRepository->findByQuery($query, true); | |
$poi = $this->poiRepository->findByLocation($searchedCoords['location_lat'], $searchedCoords['location_lng']); | |
return View::make('search.index', [ | |
'listings' => $listings, | |
'location' => [ | |
'name' => 'Kentish Town, NW5', | |
'info' => 'Kentish town', | |
'coordinates' => $searchedCoords | |
], | |
'more' => $poi, | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment