public function __construct() { global $isAuth, $user; # Check if parent is callable if (is_callable('parent::__construct')) { parent::__construct(); } $auth = Arxmin::getAuth(); $isAuth = $auth->check(); $user = $auth->getUser(); $menu = Arxmin::getMenu(); // Apply_filters $eventMenu = event(new InitMenuEvent($menu, $user)); if ($eventMenu) { $menu = array_pop($menu); } $widgets = Arxmin::getWidgets(); $theme_url = Arxmin::getAssetsUrl(); # Add Arxmin hook $this->assign(get_defined_vars()); /** * Default Javascript variables */ \Hook::put('__app.debug', \Config::get('app.debug') ? 1 : 0); \Hook::put('__app.theme_url', $theme_url); \Hook::put('__app.base_url', url('/')); \Hook::put('__app.api_url', Arxmin::getApiUrl()); }
/** * Return to the first link of the dynamic menu */ public function anyIndex() { global $arxminUser, $arxminAuth; try { $arxminAuth = Arxmin::getAuth()->check(); if ($arxminAuth) { $menu = Arxmin::getMenu(); return redirect($menu[0]['link']); } } catch (Exception $e) { Log::error($e); } return redirect('arxmin/login'); }
public function __construct() { parent::__construct(); $this->auth = Arxmin::getAuth(); }
/** * Create a new filter instance. * * @param Guard $auth */ public function __construct(Guard $auth) { $this->auth = Arxmin::getAuth(); }