Entrust package and Laravel 5.1.11+
Since Laravel 5.1.11, Laravel has provided the new authorization services (ACL) out of the box. That's great.
The bad news is, Entrust doesn't play well with the new feature (Entrust conflicts with Laravel 5.1's new built-in Authorization).
If you're using Laravel 5.1.11 or newer, you may need to apply a temporary fix:
It looks like the new Authorizable trait has a can method. If you have this error:
Trait method can has not been applied...
You may resolve this issue by using may instead:
use Authenticatable, CanResetPassword, PresentableTrait, Authorizable, EntrustUserTrait {
EntrustUserTrait::can as may;
Authorizable::can insteadof EntrustUserTrait;
}
We believe Entrust's author will update the package soon.
For more information, please take a look at these issues on GitHub:
https://github.com/Zizaco/entrust/issues/379
https://github.com/Zizaco/entrust/issues/371
Learning Laravel 5 book will be updated to support Laravel 5.1.11 soon. Stay tuned :)
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.1 Tips