wishfoundry / Authorize

Authentication and Authorization framework rolled into one

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example with Controller

abstractFlo opened this issue · comments

Can you create an example with a working Controller? Where must i set the rules e.g.??

Kind Regards

commented

Rules are defined using Auth::deny() or Auth::allow()
As is mentioned on the readme, the recommended place to put your rules is in a filter. That way your rules are reusable between controllers, and you only load the rules which will be required(faster). You could certainly define them in your controller if you wanted, or even in your views. But I wouldn't write up docs for your specific application.
More documentation is available however at: https://github.com/machuga/authority and the older: http://vespakoen.github.io/authority-laravel/