PHP code example of cyrixbiz / acl

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

    

cyrixbiz / acl example snippets


    composer 

  'providers' => [
    // ...
    cyrixbiz\acl\AclServiceProvider::class,
    // ...
  ];
    

    //after namespace .....
    use cyrixbiz\acl\traits\hasRelation;
    
    //after Notifiable in Class
    //for Example: use Notifiable, hasRelation;
    
    , hasRelation;
    

    php artisan make:acl
    

    php artisan make:acl argument
    

    protected $middlewareGroups = [
      //
    'acl' => [\cyrixbiz\acl\Http\Middleware\Acl::class,
            ],
    

    // after namespace
    use Illuminate\Support\Facades\Schema;
    // Inside Boot-Method
    Schema::defaultStringLength(191);
    

Route::middleware(['web' , 'acl'])
    ->group(function () {
        Route::get('user', 'cyrixbiz\acl\controller\UserController@index')
            ->name('user.index');
});