modifyResponse() public method

Modify the response and inject the debugbar (or data in headers)
public modifyResponse ( Request $request, Response $response ) : Response
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
return Symfony\Component\HttpFoundation\Response
Esempio n. 1
0
 /**
  * Handle an incoming request.
  *
  * @param  Request  $request
  * @param  Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     try {
         /** @var \Illuminate\Http\Response $response */
         $response = $next($request);
     } catch (Exception $e) {
         $response = $this->handleException($request, $e);
     }
     // Modify the response to add the Debugbar
     $this->debugbar->modifyResponse($request, $response);
     return $response;
 }
Esempio n. 2
0
 /**
  * Modify the response and inject the debugbar (or data in headers)
  *
  * @param \Symfony\Component\HttpFoundation\Request $request
  * @param \Symfony\Component\HttpFoundation\Response $response
  * @return \Symfony\Component\HttpFoundation\Response 
  * @static 
  */
 public static function modifyResponse($request, $response)
 {
     return \Barryvdh\Debugbar\LaravelDebugbar::modifyResponse($request, $response);
 }