modernben/track_logins

A package to quickly add on a login log

v0.1.1 2021-04-16 14:16 UTC

This package is auto-updated.

Last update: 2024-04-04 20:51:17 UTC


README

Latest Version on Packagist Total Downloads

Installation

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'),
];

Usage

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.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.