Support the ongoing development of Laravel.io →
Authentication Session
Last updated 1 year ago.
0

I don't think there is a core event for this... But if you can't find, just create it :) In your controller or wherever where you're putting your login logic, If the user checked remember me, fire off an event, like so:

// if the user checked remember me:
Event::fire('auth.session.new', array($user));
Last updated 1 year ago.
0

The thing is, its easy to track logins that go through auth::login but its not easy to track the new authenticated sessions that are logged in via a cookie (remember me).

i can add a field last_login to the db that updates when the user logins via auth::login but this doesnt update when the user returns and is authed via cookie

Last updated 1 year ago.
0

check if (Auth::viaRemember())

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

adulion adulion Joined 7 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.