I am using entrust to manage roles and permission in my application. I am having trouble to call method attachPermission()
on user. Then I tried it another way I assigned all permissions to a role. When I sign-in using that user I get false
for every permission from can()
method.
I can see all permissions assigned to a role. But even registering a middle-ware or calling method;
Entrust::routeNeedsPermission('admin/countries*','countries-list', Redirect::to('/admin'));
Is returning false means redirects me to /admin. I don't know what's wrong with it or It is some kind of compatibility issue with laravel 5.1.