Just change your staff filter:
Route::filter('staff', function()
{
// Lines of code to get role
if($role != 'staff' || $role != 'admin') return View::make('errors.401');
});
I have a filter inGroup, which checks if user has the group or he is an admin he get access otherwise not.
So you don't need to write an extra filter for each role. You have than only one filter inGroup (or for you inRole).
See http://laravel.com/docs/routing#route-filters Filters with parameters
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community