Rename middleware() to aliasMiddleware()

parent 83f7f27b
...@@ -90,7 +90,7 @@ class CoreServiceProvider extends ServiceProvider ...@@ -90,7 +90,7 @@ class CoreServiceProvider extends ServiceProvider
foreach ($middlewares as $name => $middleware) { foreach ($middlewares as $name => $middleware) {
$class = "Modules\\{$module}\\Http\\Middleware\\{$middleware}"; $class = "Modules\\{$module}\\Http\\Middleware\\{$middleware}";
$router->middleware($name, $class); $router->aliasMiddleware($name, $class);
} }
} }
} }
......
...@@ -114,7 +114,7 @@ class UserServiceProvider extends ServiceProvider ...@@ -114,7 +114,7 @@ class UserServiceProvider extends ServiceProvider
private function registerMiddleware() private function registerMiddleware()
{ {
foreach ($this->middleware as $name => $class) { foreach ($this->middleware as $name => $class) {
$this->app['router']->middleware($name, $class); $this->app['router']->aliasMiddleware($name, $class);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment