PHP code example of andradedaniel / jwt-auth-consumer

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

    

andradedaniel / jwt-auth-consumer example snippets


Route::middleware('jwt.auth')->group(function () {
    Route::get('/relatorios', ReportController::class);
});

Route::get('/atendimento', AtendimentoController::class)
    ->middleware(['jwt.auth', 'access-control:ATENDIMENTO_CRIAR_PRESENCIAL|ATENDIMENTO_CRIAR_TELEFONICO']);

$user = $request->user(); // instância de SpunetGestao\JwtAuthConsumer\Auth\JwtUser
bash
php artisan vendor:publish --tag=config --provider="SpunetGestao\JwtAuthConsumer\JwtAuthConsumerServiceProvider"