PHP code example of jobsys / permission
1. Go to this page and download the library: Download jobsys/permission 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/ */
jobsys / permission example snippets
class User extends Authenticatable
{
use HasPermissions, HasRoles;
...
}
bash
-- 默认会执行全部初始化,如需指定某部分内加上 `tag` 选项
php artisan vendor:publish --provider="Jobsys\Permission\PermissionServiceProvider"
php artisan vendor:publish --provider="Jobsys\Permission\PermissionServiceProvider" --tag="config"
php artisan vendor:publish --provider="Jobsys\Permission\PermissionServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Jobsys\Permission\PermissionServiceProvider" --tag="views"
bash
php artisan migrate