wishfoundry / Authorize

Authentication and Authorization framework rolled into one
Other
8 stars 3 forks source link

Example with Controller #4

Open abstractFlo opened 11 years ago

abstractFlo commented 11 years ago

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

Kind Regards

wishfoundry commented 11 years ago

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/