protected function addMiddlewareGroups($middlewareGroups)
    {
        if (is_array($middlewareGroups) && (count($middlewareGroups) > 0)) {
            foreach ($middlewareGroups as $key => $groupMiddleware) {
                foreach ($groupMiddleware as $middleware) {
                    $this->pushMiddlewareToGroup($key, $middleware);
                }
            }
        }
    }
protected function addMiddlewareGroups($middlewareGroups)
    {
        if (is_array($middlewareGroups) && (count($middlewareGroups) > 0)) {
            foreach ($middlewareGroups as $key => $groupMiddleware) {
                foreach ($groupMiddleware as $middleware) {
                    $this->pushMiddlewareToGroup($key, $middleware);
                }
            }
        }
    }
protected function addMiddlewareGroups ( $ middlewareGroups ) { if ( is_array ( $ middlewareGroups ) && ( count ( $ middlewareGroups ) > 0 ) ) { foreach ( $ middlewareGroups as $ key => $ groupMiddleware ) { foreach ( $ groupMiddleware as $ middleware ) { $ this -> pushMiddlewareToGroup ( $ key , $ middleware ) ; } } } }
Add middleware groups to the router.

@param array $middlewareGroups
Add middleware groups to the router .