Skip to content

Commit

Permalink
Fixing the HTTP Kernel Middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Sep 25, 2015
1 parent 731d06b commit 6eb445b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Traits/LocalizationKernelTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* @property \Illuminate\Foundation\Application app
* @property \Arcanedev\Localization\Routing\Router router
* @property array routeMiddleware
*/
trait LocalizationKernelTrait
{
Expand All @@ -20,6 +21,10 @@ protected function dispatchToRouter()
{
$this->router = $this->app['router'];

foreach ($this->routeMiddleware as $name => $middleware) {
$this->router->middleware($name, $middleware);
}

return parent::dispatchToRouter();
}
}

0 comments on commit 6eb445b

Please sign in to comment.