You can install the package via composer:
composer require modernben/track_logins
You can publish and run the migrations with:
php artisan vendor:publish --provider="Modernben\TrackLogins\TrackLoginsServiceProvider" --tag="track_logins-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Modernben\TrackLogins\TrackLoginsServiceProvider" --tag="track_logins-config"
This is the contents of the published config file:
return [
/**
* This value sets the name of the table you would like
* to store the logins on.
*/
'table' => env('MODERNBEN_LOGIN_TABLE', 'last_logins'),
];
Add the Modernben\Traits\TrackLogins
trait to your user model and that's it!
This works by hooking into the Login
event thrown by Laravel.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.