# Session lifetime in minutes
SESSION_LIFETIME=10
class Kernel extends HttpKernel
{
// ...
protected $middlewareGroups = [
'web' => [
// ...
AppHttpMiddlewareSessionTimeout::class,
],
}
class LoginController extends Controller
{
// ...
protected function authenticated(Request $request, $user)
{
$user->last_seen_at = Carbon::now()->format('Y-m-d H:i:s');
$user->save();
}
}