1. Go to this page and download the library: Download hexters/rolevel 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/ */
hexters / rolevel example snippets
$ php artisan vendor:publish --tag=rolevel
$ php artisan migrate
return [
[
'display' => 'Menu Access', // display name
'gate' => 'module.access.index', // must uniq
'url' => null, // URL can set null if menu have submenu
'classId' => '', // id attribute
'className' => '', // class style attribute
'classIcon' => '', // font icon code
/*
| ------ Submenu ------
*/
'childs' => [
[
'display' => 'Assign Permissions',
'gate' => 'module.access.assign.permission.index',
'url' => '/admin/assign/permission',
'classId' => '',
'className' => '',
'classIcon' => '',
'permissions' => [
[
'gate' => 'module.access.assign.permission.show',
'name' => 'Detail Permissions', // title
'description' => 'Show detail for permission' // info description
],
[
// More permission...
]
]
],
[
// More submenu...
]
]
],
[
// More menu...
]
];