Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 2
0
 public function __construct(ContentRepository $content)
 {
     parent::__construct();
     $this->content = $content;
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 3
0
 public function __construct(SystemOptionRepository $option)
 {
     parent::__construct();
     $this->option = $option;
     if (!user('object')->can('manage_system')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 4
0
 public function __construct(SettingRepository $setting)
 {
     parent::__construct();
     $this->setting = $setting;
     if (!user('object')->can('manage_system')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 5
0
 public function __construct(SystemLogRepository $log)
 {
     parent::__construct();
     $this->log = $log;
     if (!user('object')->can('manage_system')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 6
0
 public function __construct(MetaRepository $meta)
 {
     parent::__construct();
     $this->meta = $meta;
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 7
0
 public function __construct(RoleRepository $role)
 {
     parent::__construct();
     $this->role = $role;
     if (!user('object')->can('manage_users')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 8
0
 public function __construct(UserRepository $user)
 {
     parent::__construct();
     $this->user = $user;
     if (!user('object')->can('manage_users')) {
         $this->middleware('deny403');
     }
 }
Ejemplo n.º 9
0
 public function __construct(ContentRepository $content, FlagRepository $flag)
 {
     parent::__construct();
     $this->content = $content;
     $this->flag = $flag;
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
     if (!Cache::has('flags')) {
         //如果推荐位缓存不存在
         DataCache::cacheFlags();
     }
     $this->flags = Cache::get('flags');
 }
Ejemplo n.º 10
0
 public function __construct(MeRepository $me)
 {
     parent::__construct();
     $this->me = $me;
 }