php - Laravel : Entrust redirect & route protection -


im using entrust set user roles/permissions, working fine if not logged in not redirecting login page (it blocking pages error message need redirect login).

route::group(array('middleware' =>'role:customer'), function ()  

if try , use auth middleware white page (with no error) when logged in if not logged in redirect login page

route::group(array('middleware' =>'auth','role:customer'), function () 

hi sintaxis route::group should be:

route::group(['middleware' => ['role:customer']], function() { // .... }); 

or array notation.

route::group(array('middleware' => array('role:customer')), function() { // .... }); 

add array role:customer condition.

more detailed here: https://github.com/zizaco/entrust#middleware


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -