Skip to content

Commit 4dfbb0c

Browse files
author
mostafa
committed
fix ip request
1 parent 49e9b10 commit 4dfbb0c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Auth/Auth.php

+9
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public function attempt($credentials)
116116
$jwt->browser = \Request::get('browser');
117117
$jwt->os = \Request::get('os');
118118
$jwt->device = \Request::get('device');
119+
$jwt->ip = \Request::get('ip');
119120
$jwt->active = true;
120121
$jwt->guard = $this->guard;
121122
$jwt->save();
@@ -183,6 +184,14 @@ public function id()
183184

184185
}
185186

187+
public function auths()
188+
{
189+
$auths = KauthModel::where('user_id',$this->id())
190+
->orderBy('id','desc')
191+
->get();
192+
return $auths;
193+
}
194+
186195
/**
187196
*
188197
* auth logout

0 commit comments

Comments
 (0)