Laravel Authentication Log Documentation

🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.

Getting Logs

Get all authentication logs for the user:

1User::find(1)->authentications;

Get the user's last login information:

1User::find(1)->lastLoginAt();
2 
3User::find(1)->lastSuccessfulLoginAt();
4 
5User::find(1)->lastLoginIp();
6 
7User::find(1)->lastSuccessfulLoginIp();

Get the user's previous login time & IP address (ignoring the current login):

1auth()->user()->previousLoginAt();
2 
3auth()->user()->previousLoginIp();