Skip to content

Commit

Permalink
fix ip request
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Mar 31, 2019
1 parent 49e9b10 commit 4dfbb0c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Auth/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function attempt($credentials)
$jwt->browser = \Request::get('browser');
$jwt->os = \Request::get('os');
$jwt->device = \Request::get('device');
$jwt->ip = \Request::get('ip');
$jwt->active = true;
$jwt->guard = $this->guard;
$jwt->save();
Expand Down Expand Up @@ -183,6 +184,14 @@ public function id()

}

public function auths()
{
$auths = KauthModel::where('user_id',$this->id())
->orderBy('id','desc')
->get();
return $auths;
}

/**
*
* auth logout
Expand Down

0 comments on commit 4dfbb0c

Please sign in to comment.