Skip to content

Instantly share code, notes, and snippets.

@matiit
Created October 6, 2014 15:32
Show Gist options
  • Save matiit/4226304cfa144e940091 to your computer and use it in GitHub Desktop.
Save matiit/4226304cfa144e940091 to your computer and use it in GitHub Desktop.
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