fabpl / laravel-model-login
Laravel package to collect login attempt
1.1.0
2021-02-21 12:23 UTC
Requires
- php: ^7.3|^8.0
- illuminate/support: ^8.26
Requires (Dev)
- orchestra/testbench: ^6.11
README
Simply collect login attempt.
Installation
Install package via composer:
composer require fabpl/laravel-model-login
Optionally you can publish config
and mmigrations
files with:
php artisan model-login:publish
Migrate the logins
table:
php artisan migrate
Usage
Add the HasLogins
trait to your user model.
use Fabpl\ModelLogin\Traits\HasLogins; class User extends Authenticatable { use HasLogins; }
Retrieving logins
You can get the logins collections:
$userModel->logins; $userModel->successful_logins; $userModel->failed_logins;
You can browser logins using LoginInterface
binding:
use Fabpl\ModelLogin\Contracts\LoginInterface; public function index(LoginInterface $login) { $logins = $login->all(); // }
Changelog
Please see CHANGELOG.
Security
If you discover any security related issues, please email planchettefabrice at hotmail.com instead of using the issue tracker.