BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
www
/
app.imagivibe.com
/
vendor
/
laravel
/
octane
/
src
/
Exceptions
📤 Upload
📝 New File
📁 New Folder
Close
Editing: DdException.php
<?php namespace Laravel\Octane\Exceptions; use Exception; use Illuminate\Contracts\Support\Renderable; use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\HtmlDumper; class DdException extends Exception implements Renderable { public function __construct(public array $vars) { $this->message = json_encode($vars); } /** * Get the evaluated contents of the object. * * @return string */ public function render() { $dump = function ($var) { $data = (new VarCloner())->cloneVar($var)->withMaxDepth(3); return (string) (new HtmlDumper(false))->dump($data, true, [ 'maxDepth' => 3, 'maxStringLength' => 160, ]); }; return collect($this->vars)->map($dump)->implode(''); } }
Save
Cancel