romanbican / roles

Powerful package for handling roles and permissions in Laravel 5
MIT License
1.16k stars 297 forks source link

middleWare #149

Open ascito opened 8 years ago

ascito commented 8 years ago

hello , good job. Two problem around MiddleWare : first ) A statement by group with multiple key|value same as =>

Route::group(['middleware' => 'role:superadmin|role:admin' , 'prefix' => 'admin'], function () {

second )Respect level management, an exception "level < level ..." when the user session expire with

Route::group(['middleware' => 'level:8' , 'prefix' => 'admin'], function () {

thank you

bostonareahuman commented 8 years ago

so are you saying there is no way to add mutiple levels through middleware?

Krato commented 8 years ago

Sure, you can do it like this:

Route::group(['prefix' => 'dashboard', 'middleware' => 'role:admin|manager'], function() 
{