PHP code example of fabpl / laravel-model-login

1. Go to this page and download the library: Download fabpl/laravel-model-login library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fabpl / laravel-model-login example snippets


use Fabpl\ModelLogin\Traits\HasLogins;

class User extends Authenticatable
{
    use HasLogins;
}

$userModel->logins;
$userModel->successful_logins;
$userModel->failed_logins;

use Fabpl\ModelLogin\Contracts\LoginInterface;

public function index(LoginInterface $login) 
{
    $logins = $login->all();
    
    //
}
bash
php artisan model-login:publish
bash
php artisan migrate