/** * Load user pages routes */ static function loadUserPagesRoutes() { // Load user pages Route::group(['middleware' => ['visit']], function () { // Run all pages if (Schema::hasTable('pages')) { foreach (Page::where('active', 1)->get() as $page) { // Create page route Route::get($page->route, function () use($page) { // Load idiom Idiom::loadIdiom(); // Get page data file $data = (array) (include $page->getDataPath()); // Display page view file return view($page->getView(), $data); }); } } }); }
/** * Create a new authentication controller instance. * * @return void */ public function __construct() { // Load idiom Idiom::loadIdiom(); $this->middleware('guest', ['except' => 'getLogout']); }
/** * Change session idiom * * @param string $idiom * @return redirect */ public function setIdiom($idiom) { Idiom::setIdiom($idiom); return redirect('/'); }
/** * Create a new password controller instance. * * @return void */ public function __construct() { // Load idiom Idiom::loadIdiom(); $this->middleware('guest'); }
/** * Create a new controller instance. * * @return void */ public function __construct() { // Load idiom Idiom::loadIdiom(); }
/** * Init admin controller */ public function __construct() { Idiom::loadIdiom(); }