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

bump i am looking this too

Last updated 1 year ago.
0

BUMP! Same here. Can't seem to find anything about this anywhere.

0

What about using events like so:

Event::listen('auth.login', function($user)
{
    $user->login_at = new DateTime;

    $user->save();
});
0

Thanks for your reply. This would indeed be the most logical approach.

However, the 'auth.login' doesn't fire when authenticating via cookie, right?

0

Reference : http://stackoverflow.com/questions/25462157/does-laravel-4-hav...

Event::listen('auth.login', function($user)
{
    if(Auth::viaRemember())
    {
        $event = Event::fire('auth.cookieLogin', array($user));
    }
    // don't return false here unless you want to stop propagation of the other auth.login event listener.
});

Event::listen('auth.cookieLogin', function($user)
{
    // do something and/or return something.
});
Last updated 9 years ago.
0

Thanks! Unfortunately it seems to be a dead end, because the 'auth.login' event does not fire at all. The guy in the Stack Overflow topic seems to be unsuccessful as well.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Jakobud jakobud Joined 31 Jan 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.