1. Go to this page and download the library: Download eng-mmustafa/canopy 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/ */
eng-mmustafa / canopy example snippets
use Dedoc\Scramble\Scramble;
use Dedoc\Scramble\Support\Generator\OpenApi;
use Dedoc\Scramble\Support\Generator\SecurityScheme;
Scramble::afterOpenApiGenerated(function (OpenApi $openApi) {
$openApi->secure(
SecurityScheme::http('bearer', 'JWT')
);
});
use Dedoc\Scramble\Attributes\Group;
#[Group('Admin / Users')]
class UserController
{
#[Group('Admin / Users / Sessions')]
public function sessions() {}
}