PHP code example of riteshjha / laravel-permission

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

    

riteshjha / laravel-permission example snippets


    php artisan vendor:publish --provider="Rkj\Permission\PermissionServiceProvider"
    

    'providers' => [
        // ...
        Rkj\Permission\PermissionServiceProvider::class,
    ];

    'aliases' => [
        //...
        'Permission' => Rkj\Permission\Facades\Permission::class
    ];
    
config/permission.php
 php artisan migrate 
config/permission.php
config/permission.php
 $this->authorize('project.create')