Trying to apply more than one middleware on a route group!
Currently, have several users, with several roles!
Some users have access to a route only if is from a group.
for this, I have created a middleware (named auth.admin only for tests)
The authentication that I'm using, is the AuthBasic.
So, I created a route group, with the following config:
Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'middleware' => 'auth.basic|auth.admin'], function() {
// foo
}
(example from http://laravel.com/docs/5.0/routing#route-groups)
the middleware auth.admin is registered on Kernel.php.
When I try to access this route, Laravel throw a exception:
Class auth.basic|auth.admin does not exist
if I try only auth.basic, works ok.
If I try only auth.admin, works ok too.
I don't want to put this middleware on controller, because this route group have more than 10 controllers.