PHP code example of yxvt / beermission

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

    

yxvt / beermission example snippets


$this->acl
    ->bearer($this->bearer)
    ->that(static function (RequiredGrantBuilder $grantBuilder): void {
        $grantBuilder->hasRole('Role', 'RoleScope', 'RoleScopeValue');
        $grantBuilder->hasPermission('Permission', 'PermissionScope', 'PermissionScopeValue');
    })
    ->shouldBeGrantedAccessWhen()
    ->hasAllExpectedGrants();