/** * Display a listing of the pages. * * @return Response */ public function index() { $pages = Page::whereLanguageId($this->language->id); $pages = $pages->count() > 1 ? $this->language->pages->toHierarchy() : $pages->get(); return $this->viewPath("index", $pages); }