Get laravel current route group in middleware
问题 Is there a way to get the parent route group of current route in Laravel middlewares? public function handle($request, Closure $next, $guard = null) { // here I mean } 回答1: You can't get the group from a route, especially that you can nest groups within other groups. The easiest way to be able to tell which group current request belongs to would be to add a parameter to your middleware - see the docs for more details here: https://laravel.com/docs/5.2/middleware#middleware-parameters First,