PHP code example of heimo / think-jwt
1. Go to this page and download the library: Download heimo/think-jwt 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/ */
heimo / think-jwt example snippets
Route::group('hello', function(){
...
Route::rule('hello/:name','hello');
})->middleware(\heimo\auth\middleware\Jwt::class);
Auth::make()->generateToken();
Auth::make()->refreshToken();//手动刷新token