I am creating a fairly extensive application for the client, and I will need to create some kind of control over group permissions. I decided to go with Cartalyst and their Sentry package .
So far so good!
Now the problem that I am facing is the best way to detect the permission of a group of users, since there are more than one of them, so I can’t just use one filter and do it with it.
For example, I would do something like this:
For pages requiring admin access
Route::group(array('before' => 'is_admin'), function()
{
Route::get('admin', array('as'=>'admin', 'uses'=>'admin@index'));
});
For pages that need moretaor access, etc.
Route::group(array('before' => 'is_moderator'), function()
{
Route::get('orodja/plosca', array('as'=>'moderator', 'uses'=>'moderator@index'));
});
, , .
Controller::detect() REST-full, , , . , .?
, :. , .
!