durimjusaj/lumen-dingo-adapter

Using Dingo + JWT in your Lumen Based Application with no pain

dev-master 2020-06-01 10:55 UTC

This package is auto-updated.

Last update: 2020-08-31 11:37:06 UTC


README

Using Dingo + JWT in your Lumen Based Application with no pain.

Installation

composer require durimjusaj/lumen-dingo-adapter

Configuration

In your bootstrap/app.php file add this line:

$app->register(Zeek\LumenDingoAdapter\Providers\LumenDingoAdapterServiceProvider::class);

Below is environment variable you should configure to make this package works out of the box:

API_PREFIX=api

Guarding Your Routes via Dingo Routing

$app->make(Dingo\Api\Routing\Router::class)->version('v1', function ($api) {
    $api->group([
        'middleware' => 'api.auth',
    ], function ($api) {
        $api->get('/', 'App\Http\Controllers\DefaultController@index');
    });
});

This package is copy of (https://github.com/krisanalfa/lumen-dingo-adapter).