Example #1
0
 /**
  * Create a new HTTP kernel instance.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function __construct(Application $app, Router $router)
 {
     $this->app = $app;
     $this->router = $router;
     $router->middlewarePriority = $this->middlewarePriority;
     foreach ($this->middlewareGroups as $key => $middleware) {
         $router->middlewareGroup($key, $middleware);
     }
     foreach ($this->routeMiddleware as $key => $middleware) {
         $router->aliasMiddleware($key, $middleware);
     }
 }