Providers/CoreServiceProvider.php
public function registerMiddleware(Router $router)
    {
        foreach ($this->middleware as $module => $middlewares) {
            foreach ($middlewares as $name => $middleware) {
                $class = "Modules\\{$module}\\Http\\Middleware\\{$middleware}";

                $router->middleware($name, $class);
            }
        }
    }
public function registerMiddleware(Router $router)
    {
        foreach ($this->middleware as $module => $middlewares) {
            foreach ($middlewares as $name => $middleware) {
                $class = "Modules\\{$module}\\Http\\Middleware\\{$middleware}";

                $router->middleware($name, $class);
            }
        }
    }
public function registerMiddleware ( Router $ router ) { foreach ( $ this -> middleware as $ module => $ middlewares ) { foreach ( $ middlewares as $ name => $ middleware ) { $ class = "Modules\\{$module}\\Http\\Middleware\\{$middleware}" ; $ router -> middleware ( $ name , $ class ) ; } } }
Register the filters.

@param Router $router

@return void
Register the filters .