PHP code example of lipetuga / laravel-u2f

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

    

lipetuga / laravel-u2f example snippets


 protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    // ...
    'u2f' => \Lipetuga\U2f\Http\Middleware\U2f::class,
    ];

Route::get('admin/profile', ['middleware' => ['auth', 'u2f'], function () {
    //
}]);

/**
 * Create a new controller instance.
 *
 * @return void
 */
public function __construct()
{
    $this->middleware(['auth', 'u2f']);
}
bash
$ php artisan vendor:publish --provider="Lipetuga\U2f\U2fServiceProvider" --tag=u2f-migrations
$ php artisan migrate