示例#1
0
 public function __construct(Request $request)
 {
     parent::__construct($request);
     $this->theme = Theme::byRequest();
     $this->theme->register($this->is_auth);
     $this->globalViewParams = ['site_locale' => $this->localeCode, 'site_version' => appVersion(), 'site_name' => appName(), 'site_logo' => appLogo(), 'site_keywords' => appKeywords(), 'site_short_name' => appShortName(), 'site_description' => appDescription(), 'site_author' => appAuthor(), 'site_email' => appEmail(), 'site_domain' => appDomain(), 'site_home_url' => homeUrl(), 'is_auth' => $this->is_auth, 'auth_user' => $this->auth_user, 'session_id' => $request->session()->getId()];
     foreach ($this->globalViewParams as $key => $value) {
         view()->share($key, $value);
     }
 }
示例#2
0
 public function register($is_auth = false)
 {
     $this->registerExtensions($is_auth);
     $this->registerWidgets($is_auth);
     parent::register($is_auth);
 }