Esempio n. 1
0
 /**
  * @param \Illuminate\Http\Request  $request
  * @param \Illuminate\Http\Response $response
  *
  * @return void
  */
 public function terminate($request, $response)
 {
     $middlewares = $this->app->shouldSkipMiddleware() ? [] : array_merge($this->gatherRouteMiddleware($request), $this->middleware);
     foreach ($middlewares as $middleware) {
         if (!is_string($middleware)) {
             continue;
         }
         list($name, $parameters) = $this->parseMiddleware($middleware);
         $instance = $this->app->make($name);
         if (method_exists($instance, 'terminate')) {
             $instance->terminate($request, $response);
         }
     }
     $this->app->terminate();
 }