Beispiel #1
0
 /**
  * @return \Someline\Model\Foundation\User|\Someline\Models\Foundation\User
  */
 function auth_user()
 {
     return current_auth_user();
 }
 public function authUserId()
 {
     return current_auth_user()->user_id;
 }
 public function apply($model, RepositoryInterface $repository)
 {
     $model = $model->where('user_id', '=', current_auth_user()->user_id);
     return $model;
 }
 /**
  * @return \Someline\Models\Foundation\User
  */
 public function getAuthUser()
 {
     return current_auth_user();
 }
Beispiel #5
0
 /**
  * @return string|null
  */
 function refresh_jwt_token()
 {
     $jwt_token = null;
     if (\Auth::check()) {
         $jwt_token = \JWTAuth::fromUser(current_auth_user());
         \Session::put('jwt_token', $jwt_token);
     }
     return $jwt_token;
 }