Recca0120\LaravelTracy\BlueScreen::render PHP Method

render() public method

render.
public render ( Exception $exception ) : string
$exception Exception
return string
    public function render(Exception $exception)
    {
        $exception = $this->fixStack($exception, error_get_last());
        ob_start();
        Helpers::improveException($exception);
        Debugger::getBlueScreen()->render($exception);
        return ob_get_clean();
    }

Same methods

BlueScreen::render ( Exception $exception, $error = null ) : string

Usage Example

Example #1
0
 /**
  * Render an exception into an HTTP response.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Exception               $e
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function render($request, Exception $e)
 {
     $response = $this->exceptionHandler->render($request, $e);
     if ($response instanceof RedirectResponse) {
         return $response;
     }
     $content = $response->getContent();
     if ($content instanceof View) {
         return $response;
     }
     $response->setContent($this->blueScreen->render($e));
     return $response;
 }