1. Go to this page and download the library: Download phpdot/iam 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/ */
phpdot / iam example snippets
use PHPdot\Iam\Authorization\Attribute\Permission;
final class Permissions
{
#[Permission(name: 'Edit employees', description: 'Edit employee records')]
public const string EmployeeEdit = 'hr.employee.edit';
#[Permission(name: 'Restart the server', root: true)]
public const string ServerRestart = 'system.server.restart';
}