PHP code example of xt / laravel-login-history
1. Go to this page and download the library: Download xt/laravel-login-history 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/ */
xt / laravel-login-history example snippets
use Xt\LoginHistory\Traits\HasLoginHistory;
class User extends Model
{
use HasLoginHistory;
}
use \Illuminate\Support\Facades\Auth;
Auth::user()->addLoginHistory();
bash
php artisan vendor:publish --tag=laravel-login-history-migrations
bash
php artisan vendor:publish --tag=laravel-login-history-config