Exemple #1
0
 function json()
 {
     $this->requiring();
     $authority = new Authority();
     $authorized = $authority->authorize();
     if ($authorized !== true) {
         die('認証に失敗しました。ログインし直してください。');
     } else {
         return $this->execute();
     }
 }
Exemple #2
0
 public function run()
 {
     DB::table('cms_privileges')->delete();
     $admin = Admin::first();
     $sections = Section::get();
     foreach ($sections as $section) {
         Authority::authorize($admin)->admin($section);
     }
 }