Zizaco/entrust — pull request #37 by searsaw (2013-08-10 23:06:33+00:00)
Title: Added __NAMESPACE__ to HasRoles trait and EntrustRole class to make the ...

When working with this package, I gave my models a namespace of `App\Models`. I figured this was par for the course when working with Laravel to keep my Models from interfering with other Models. When I tried to add roles to my user model and such, it through an error saying it couldn't find a `Role` class. After some digging, I realized it was coded under the impression that no one would namespace their models. I made a quick change to the relationship function in the `HasRole` trait and the `EntrustRole` Model to allow for someone to namespace their models. This does assume that the `Role`, `Permission`, and `User` model are all in the same namespace. However, I feel this is a safe assumption.