Looking to hire Laravel developers? Try LaraJobs

laravel-model-login maintained by fabpl

Description
Laravel package to collect login attempt
Last update
2021/03/02 10:30 (dev-main)
License
Links
Downloads
69
Tags

Comments
comments powered by Disqus

Laravel Model Login

Simply collect login attempt.

styleci.io

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.

Credits