PHP code example of korodo / jwt-guard

1. Go to this page and download the library: Download korodo/jwt-guard 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/ */

    

korodo / jwt-guard example snippets


    'providers'=>[
        ...
        App\Providers\RouteServiceProvider::class,
        \Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
        \Korodo\JWTGuard\JWTGuardServiceProvider::class,
        ...
    ]

'guards' => [
    ...
    'api' => [
        'driver' => 'jwt', // it was token
        'provider' => 'users',
    ],
    ...
],
shell script
php artisan jwt:generate