PHP code example of glocurrency / api-layer

1. Go to this page and download the library: Download glocurrency/api-layer 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/ */

    

glocurrency / api-layer example snippets


'client' => \Laravel\Passport\Http\Middleware\CheckClientCredentials::class,
'scopes' => \Laravel\Passport\Http\Middleware\CheckScopes::class,
'scope' => \Laravel\Passport\Http\Middleware\CheckForAnyScope::class,

use Glocurrency\ApiLayer\ApiLayer;

public function boot()
{
    $this->registerPolicies();

    ApiLayer::passport();
}

use Glocurrency\ApiLayer\Traits\UnauthenticatedTrait;

class Handler extends ExceptionHandler
{
    use UnauthenticatedTrait;

php artisan glo:apilayer:passport

php artisan passport:client --client
php artisan passport:client --personal