PHP code example of lgrevelink / laravel-simple-jwt

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

    

lgrevelink / laravel-simple-jwt example snippets


LGrevelink\LaravelSimpleJWT\Providers\SimpleJwtServiceProvider::class

$app->register(LGrevelink\LaravelSimpleJWT\Providers\SimpleJwtServiceProvider::class);

$app->withFacades();

php artisan make:jwt-blueprint MyFirstBlueprint

$request->validate([
    'foo' => 'jwt',
    'bar' => new ValidJwt(),
]);

$request->validate([
    'foo' => 'jwt:' . App\JwtTokens\MyFirstBlueprint::class,
    'bar' => new ValidJwt(App\JwtTokens\MyFirstBlueprint::class),
]);