/** * @param $value * @param null $label */ public static function dump($value, $label = null) { echo Tag::pre(); if ($label) { echo Tag::div($label); } var_dump($value); echo Tag::pre()->close(); }
protected function renderException(\Throwable $exception) { $div = Tag::div(Tag::h2('Exception trace'), 'errors'); $div->append(Tag::h2('Exception'), Tag::i(get_class($exception))); $div->append(Tag::h2('Message'), Tag::pre($exception->getMessage())); $div->append(Tag::h2('File'), Tag::pre($exception->getFile())->append(':', $exception->getLine())->setSeparator('')); // shorten Trace $trace = Str::cast($exception->getTraceAsString())->replace(getcwd() . '/', ''); $div->append(Tag::h2('Trace'), Tag::pre($trace)); return $div; }