PHP code example of artox-lab / fisher
1. Go to this page and download the library: Download artox-lab/fisher 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/ */
artox-lab / fisher example snippets
ername for DB
$username = 'root';
// Password for DB
$password = '123';
// Initial class role system
$roleSystem = \Fisher\RoleSystem::getInstance('mysql:host=localhost;charset=utf8;dbname=fisher_database', $username, $password);
// User id for db table `re_account_user`
$userId = 95;
// check rule for user
echo $roleSystem->checkAccess($userId, 'admin/catalog/products');
bash
php init.php