Update last_seen when logging in
Update last_seen when logging in
This commit is contained in:
commit
04ed457570
1 changed files with 6 additions and 0 deletions
|
@ -3,9 +3,12 @@
|
|||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
|
@ -66,6 +69,9 @@ class LoginController extends Controller
|
|||
}
|
||||
|
||||
if ($this->attemptLogin($request)) {
|
||||
$user = Auth::user();
|
||||
$user->last_seen = now();
|
||||
$user->save();
|
||||
return $this->sendLoginResponse($request);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue