/** * Show the appropriate view depending on the slug. * * YOU MAY WANT TO MODIFY THIS * Right now it only loads some dummy views. * * @return Response */ public function page($slug) { // get the corresponding page for that slug $page = Page::findBySlugOrId($slug)->withFakes(); // if there is such a page if ($page && $page->translation_lang == \App::getLocale()) { // load the proper template return view('page_templates.' . $page->template, ['page' => $page]); } abort(404); }