PHP code example of william / laravel-rigger

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

    

william / laravel-rigger example snippets


/**
 * Define the routes for the application.
 *
 * @return void
 */
public function map()
{
    $this->mapApiRoutes();

    $this->mapWebRoutes();

    Rigger::routes();
}


'belongsToMany' =>  [
    'roles',
]

'belongsToMany' =>  [
    ['roles', 'model_has_roles', 'model_id', 'role_id'],
]


'user'  =>  [
    'searchableFields'    =>  [
        'name',
    ],
]

'authorized'    =>  [
    'role'          =>  'admin',
    'permission'    =>  'update-user'
]

php artisan vendor:publish --provider "WilliamWei\LaravelRigger\Providers\LaravelRiggerProvider"

php artisan route:list