Package Data | |
---|---|
Maintainer Username: | kopin88 |
Maintainer Contact: | kopin88@gmail.com (kopin88) |
Package Create Date: | 2017-06-16 |
Package Last Update: | 2017-06-22 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:15:01 |
Package Statistics | |
---|---|
Total Downloads: | 19 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Via Composer
$ composer require learn88/multirole
Next, add your new Provider
to the providers array of config/app.php:
'providers' => [
learn88\multirole\multiroleServiceProvider::class,
],
Next, add your new Kernel
to the HTTP kernel
$routeMiddleware
protected $routeMiddleware = [
'roles' => \learn88\multirole\Http\Middleware\CheckRole::class,
],
Command:
php artisan make:multirole
composer dump-autoload
required : database
php artisan migrate
php artisan db:seed
username : admin@learn88.dev
password : password
Route::get('users}', [
'uses' => 'UserCtrl@index',
'as' => 'users.show',
'middleware'=>'roles', // route middleware check role
'roles'=>['role_admin'] // allow role name ['role_name' , 'etc..']
]);
The MIT License (MIT). Please see License File for more information.