Error: Attribute [filter] does not exist.
Case: When using the following syntax (below) in my my route I had this kind of error Attribute [filter] does not exist.
Goal: filter permission per page.
Syntax 1.
Route::filter(['superadmin','admin'], function()
{
// check the current user
if (!Entrust::can(['can.create.user','can.edit.user','can.delete.user'])) {
return Redirect::to('user-access');
}
});
// only users with roles that have the 'manage_posts' permission will be able to access any admin/post route
Route::when('user-access', ['superadmin','admin']);
Laravel Version: 5.6
Error: Attribute [filter] does not exist. Case: When using the following syntax (below) in my my route I had this kind of error
Attribute [filter] does not exist.
Goal: filter permission per page.Syntax 1.
// only users with roles that have the 'manage_posts' permission will be able to access any admin/post route
Route::when('user-access', ['superadmin','admin']);
Syntax 2.
How to solve this?