Beispiel #1
0
 /**
  * Get the user info from the session
  *
  * @return mixed
  */
 public function userInfo()
 {
     if (Session::has('auth:' . trim($this->table))) {
         return Session::get('auth:' . trim($this->table));
     }
     return [];
 }
Beispiel #2
0
 public function userInfo()
 {
     $user = array();
     if (Session::has('auth:' . trim($this->table))) {
         $user = Session::get('auth:' . trim($this->table));
         return $user;
     }
     return $user;
 }
Beispiel #3
0
 /**
  * Check is there any flash message in session
  *
  * @param  string $key
  * @return bool
  *
  */
 public function hasFlash($key = null)
 {
     $flashArray = Session::get('flashMessages');
     if (!is_null($key)) {
         if (@isset($flashArray[$key])) {
             return @$flashArray[$key];
         }
     }
     return false;
 }