laravel-frontend-presets / tall

A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel
MIT License
2.46k stars 207 forks source link

Save User’s Last Login Time and IP Address #73

Closed ArtMin96 closed 4 years ago

ArtMin96 commented 4 years ago

Hi. How can I use this in Auth\Login? I can not find this method.

protected function authenticated(Request $request, $user)
{
    $user->update([
        'last_login_at' => Carbon::now()->toDateTimeString(),
        'last_login_ip' => $request->getClientIp()
    ]);
}
ryangjchandler commented 4 years ago

@ArtMin96 You can add this method's logic to the authenticate method in Auth\Login.

ArtMin96 commented 3 years ago

@ryangjchandler Stil not working.