1. Go to this page and download the library: Download lab404/laravel-auth-checker 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/ */
lab404 / laravel-auth-checker example snippets
use Lab404\AuthChecker\Models\HasLoginsAndDevices;
use Lab404\AuthChecker\Interfaces\HasLoginsAndDevicesInterface;
class User extends Authenticatable implements HasLoginsAndDevicesInterface
{
// ...
use HasLoginsAndDevices;
}
[
[
'ip_address' => '1.2.3.4',
'device_id' => 1, // ID of the used device
'type' => 'auth',
'device' => [
// See Devices
],
'created_at' => '2017-03-25 11:42:00',
],
// ...
]