PHP code example of trappistes / api-sign

1. Go to this page and download the library: Download trappistes/api-sign 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/ */

    

trappistes / api-sign example snippets

shell
php artisan vendor:publish
shell
php artisan migrate
 injectablephp
$app->register(\Trappistes\ApiSign\SignatureServiceProvider::class);
shell
将 database/migrations/create_access_keys_table.php 复制到 database/migrations 目录下
shell
php artisan migrate
injectablephp
$app->routeMiddleware([
   'sign' => \Trappistes\ApiSign\Middlewares\SignatureValidate::class
]);