PHP code example of biscolab / laravel-authlog

1. Go to this page and download the library: Download biscolab/laravel-authlog 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/ */

    

biscolab / laravel-authlog example snippets


'providers' => [
    ...
    Biscolab\LaravelAuthLog\AuthLogServiceProvider::class,
];

'aliases' => [
    ...
    'AuthLog' => Biscolab\LaravelAuthLog\Facades\AuthLog::class,
];



namespace App;

// .....

use Biscolab\LaravelAuthLog\Traits\AuthLoggable;

class User extends Authenticatable
{
    use AuthLoggable;
    
    // other traits
    // ......



protected $routeMiddleware = [
    ...
    'auth.log' =>  \Biscolab\LaravelAuthLog\Middleware\AuthLogMiddleware::class
];


Route::group(['middleware' => ['auth.log']], function() {

    // Your routes
});
sh
php artisan migrate
sh
php artisan authlog:logged