Introducing Laravel Quizzes! Play now

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:

User::find(1)->authentications;

Get the user's last login information:

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

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

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

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

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

auth()->user()->previousLoginAt();

auth()->user()->previousLoginIp();