本文整理匯總了PHP中Barryvdh\Debugbar\LaravelDebugbar::modifyResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP LaravelDebugbar::modifyResponse方法的具體用法?PHP LaravelDebugbar::modifyResponse怎麽用?PHP LaravelDebugbar::modifyResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Barryvdh\Debugbar\LaravelDebugbar
的用法示例。
在下文中一共展示了LaravelDebugbar::modifyResponse方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: handle
/**
* 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;
}
示例2: modifyResponse
/**
* 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);
}