/** * Show the search results page. * * @return \Response */ public function getIndex() { $term = e(Input::get('q')); $tricks = null; if (!empty($term)) { $tricks = $this->tricks->searchByTermPaginated($term, 12); } $this->view('search.result', compact('tricks', 'term')); }