PHP code example of xetreon / role-permission

1. Go to this page and download the library: Download xetreon/role-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/ */

    

xetreon / role-permission example snippets


use Xetreon\RolePermission\Traits\Permissible;



class User extends Authenticatable
{
    use Permissible;
}

php artisan migrate

php artisan xetreon:permissions

php artisan xetreon:seedRole {user_id?}
$this->checkRole($method)

$this->checkRole('update');