PHP code example of biohivetech / laravel-introspection
1. Go to this page and download the library: Download biohivetech/laravel-introspection 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/ */
biohivetech / laravel-introspection example snippets
use DataHiveDevelopment\Introspection\Introspection;
// ...
public function boot()
{
$this->registerPolicies();
Passport::routes();
Passport::tokensCan([
'user.read' => '...',
//...
]);
Introspection::routes();
}
Route::get('/orders', function () {
// Access token has both "check-status" and "place-orders" scopes...
})->middleware('scopes:check-status,place-orders');
Route::get('/orders', function () {
// Access token has either "check-status" or "place-orders" scope...
})->middleware('scope:check-status,place-orders');