コード例 #1
0
 /**
  * Performs the login redirect action.
  *
  * If the authenticated user has admin permissions
  * then they will be redirected into the admin
  * panel. If they do no, they will be sent
  * to the homepage of the website.
  * 
  * @return \Illuminate\Http\RedirectReponse
  */
 public function redirectPath()
 {
     if (Permissions::check()) {
         return Flare::adminUrl();
     }
     return '/';
 }
コード例 #2
0
 /**
  * Performs the login redirect action.
  *
  * If the authenticated user has admin permissions
  * then they will be redirected into the admin
  * panel. If they do no, they will be sent
  * to the homepage of the website.
  * 
  * @return \Illuminate\Http\RedirectReponse
  */
 protected function loginRedirect()
 {
     if (Permissions::check()) {
         return redirect()->intended(Flare::adminUrl());
     }
     return redirect('/');
 }
コード例 #3
0
ファイル: AdminManager.php プロジェクト: laravelflare/flare
 /**
  * Determines if a class is available for the current User.
  * 
  * @param string $class
  * 
  * @return bool
  */
 private function availableClass($class)
 {
     if (!Permissions::check($class)) {
         return false;
     }
     return true;
 }