Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     $self = $this;
     View::composer('frontend.layout_main', function ($view) use($self) {
         $view->with('moduleName', $this->moduleName);
         $view->with('controllerName', $this->controllerName);
     });
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $self = $this;
     View::composer('backend.layout_main', function ($view) use($self) {
         /*
          * Contact messages
          */
         $contactMessages = null;
         if (user()->hasAccess('contact', PERM_READ)) {
             $count = DB::table('contact_messages')->where('new', true)->count();
             if ($count > 0) {
                 $contactMessages = link_to('admin/contact', Lang::choice('app.new_messages', $count));
             }
         }
         $view->with('contactMessages', $contactMessages);
         $view->with('moduleName', $this->moduleName);
         $view->with('controllerName', $this->controllerName);
         $view->with('controllerIcon', $this->icon);
     });
 }