rappasoft / vault

Roles & Permissions for the Laravel 5 Framework
MIT License
103 stars 10 forks source link

Error in RouteNeedsRole.php #4

Closed lkoenigsberger closed 9 years ago

lkoenigsberger commented 9 years ago

I get the following exception when trying to implement Vault!!

ErrorException in RouteNeedsRole.php line 22:
Non-static method App\Models\Vault::hasRoles() should not be called statically, assuming $this from incompatible context

To understand i did not install your package i copied some of the classes because I don't need all of your views and stuff. Thanks

rappasoft commented 9 years ago

It won't exactly work like that, the service provider registers some bindings and the facade. If you don't need the entire system you are probably better off building your own that works better for what you need.

lkoenigsberger commented 9 years ago

Yeah your right but I've added a service provider like you did and put the stuff in also I've registered a Facade to work with.

rappasoft commented 9 years ago

It would honestly be hard to figure out without having it in front of me, a lot of the files work in unison. Something somewhere isn't connecting, did you try a composer dump-autoload? My only suggestion if you don't need the views would be to use the zizaco/entrust package and use my middleware files but replace Vault with Entrust, and use the methods that come with entrust.

lkoenigsberger commented 9 years ago

Thanks I will look into that.