PHP code example of aginev / acl

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

    

aginev / acl example snippets


Aginev\Acl\AclServiceProvider::class,

use \Aginev\Acl\Http\Traits\User;

...
// Package route prefix. Set to blank for no prefix
'routes_prefix' => 'what-ever-you-want',
...

...
// Pagination per page results
'per_page_results' => 50,
...

// validation errors format. Set to blank for default
'validation_errors_format' => '<label class="error text-danger">:message</label>',

$this->middleware('acl');

Route::group(['middleware' => 'acl'], function () {
	Route::get('group', 'SomeController@index');
});
sh
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="public"
blade
<script>
	Laravel = {
		_token: '{{ csrf_token() }}'
	};
</script>
sh
php artisan migrate --path="vendor/aginev/acl/src/Database/Migrations"
sh
php artisan db:seed --class="Aginev\Acl\Database\Seeds\RolesTableSeeder"
sh
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="config"
sh
php artisan acl:fill-permissions
sh
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="views"
sh
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="migrations"
sh
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="seeds"