PHP code example of ryanaby / lumen-auth-key
1. Go to this page and download the library: Download ryanaby/lumen-auth-key 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/ */
ryanaby / lumen-auth-key example snippets
// $app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
$app->register(Ryanaby\LumenAuthKey\Providers\AuthKeyServiceProvider::class);
$router->get('api/post/1', ['middleware' => ['auth.apikey'], function () {
//
}]);