public function __construct()
 {
     /**
      * getting role permissions
      */
     $this->auth = Auth::user();
     if (Auth::check()) {
         $this->perms = get_role_permissions($this->auth, 'articles');
         $this->perms = array_add($this->perms, count($this->perms), 'getCats');
         $this->perms = array_add($this->perms, count($this->perms), 'getFields');
         $this->perms = array_add($this->perms, count($this->perms), 'event');
         $this->perms = array_add($this->perms, count($this->perms), 'getEvents');
         $this->perms = array_add($this->perms, count($this->perms), 'brightCove');
         $this->perms = array_add($this->perms, count($this->perms), 'getAjaxTags');
         $this->perms = ['except' => $this->perms];
     } else {
         $this->perms = guest_role_permissions('articles');
         $this->perms = ['except' => $this->perms];
     }
     //print_r(bcrypt($this->auth->password));
     /**
      * Middlewares
      */
     $this->middleware('auth', ['except' => ['show']]);
     $this->middleware('RedirectUser', ['except' => ['show']]);
     $this->middleware('role', $this->perms);
     $this->middleware('language');
 }
 public function __construct()
 {
     /**
      * getting role permissions
      */
     $this->auth = Auth::user();
     if (Auth::check()) {
         $this->perms = get_role_permissions($this->auth, 'billing');
         $this->perms = array_add($this->perms, count($this->perms), 'check');
         $this->perms = array_add($this->perms, count($this->perms), 'pay');
         $this->perms = ['except' => $this->perms];
     } else {
         $this->perms = guest_role_permissions('billing');
         $this->perms = array_add($this->perms, 0, 'pay');
         $this->perms = array_add($this->perms, 1, 'check');
         $this->perms = ['except' => $this->perms];
     }
     //print_r(bcrypt($this->auth->password));
     /**
      * Middlewares
      */
     $this->middleware('auth', ['except' => ['show', 'check', 'pay']]);
     $this->middleware('role', $this->perms);
     $this->middleware('language');
 }
 public function __construct()
 {
     /**
      * getting role permissions
      */
     $this->auth = Auth::user();
     if (Auth::check()) {
         $this->perms = get_role_permissions($this->auth, 'movies');
         $this->perms = ['except' => $this->perms];
     } else {
         $this->perms = guest_role_permissions('movies');
         $this->perms = ['except' => $this->perms];
     }
     /**
      * Middlewares
      */
     $this->middleware('auth', ['except' => 'show']);
     $this->middleware('RedirectUser', ['except' => 'show']);
     $this->middleware('role', $this->perms);
     $this->middleware('language');
 }
 public function __construct(User $users)
 {
     $this->users = $users;
     $this->auth = Auth::user();
     if (Auth::check()) {
         $this->perms = get_role_permissions($this->auth, 'users');
         $this->perms = array_add($this->perms, count($this->perms), 'frontEdit');
         $this->perms = array_add($this->perms, count($this->perms), 'getAjaxUserName');
         $this->perms = ['except' => $this->perms];
     } else {
         $this->perms = guest_role_permissions('users');
         $this->perms = ['except' => $this->perms];
     }
     /**
      * Middlewares
      */
     $this->middleware('auth', ['except' => 'show']);
     $this->middleware('RedirectUser', ['except' => 'show']);
     $this->middleware('role', $this->perms);
     $this->middleware('language');
 }
 public function __construct()
 {
     /**
      * getting role permissions
      */
     $this->auth = Auth::user();
     if (Auth::check()) {
         $this->perms = get_role_permissions($this->auth, 'gallery');
         $this->perms = array_add($this->perms, count($this->perms), 'imgField');
         $this->perms = ['except' => $this->perms];
     } else {
         $this->perms = guest_role_permissions('gallery');
         $this->perms = ['except' => $this->perms];
     }
     /**
      * Middlewares
      */
     $this->middleware('auth', ['except' => ['show']]);
     $this->middleware('RedirectUser', ['except' => ['show']]);
     $this->middleware('role', $this->perms);
     $this->middleware('language');
 }
 public function __construct()
 {
     /**
      * getting role permissions
      */
     $this->auth = Auth::user();
     if (Auth::check()) {
         $this->perms = get_role_permissions($this->auth, 'settings');
         $this->perms = ['except' => $this->perms];
     } else {
         $this->perms = guest_role_permissions('settings');
         $this->perms = ['except' => $this->perms];
     }
     //print_r(bcrypt($this->auth->password));
     /**
      * Middlewares
      */
     $this->middleware('auth', ['except' => ['show']]);
     $this->middleware('RedirectUser', ['except' => ['show']]);
     $this->middleware('role', $this->perms);
     $this->middleware('language');
 }