PHP code example of baohan / token
1. Go to this page and download the library: Download baohan/token 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/ */
baohan / token example snippets
// to set up roles and relationships...
$roles = [
'admin' => new \baohan\token\Role('admin'),
'user' => new \baohan\token\Role('user'),
'guest' => new \baohan\token\Role('guest')
];
$roles['guest']->addSupervisor($roles['user']);
$roles['user']->addSupervisor($roles['admin']);