You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just have an issue with the view data collector that is not displaying objects but only the class name (even with options.views.data = true) :
It's really annoying because a lot of data are class in Laravel, like the models.
I tried a little fix in vendor/barryvdh/laravel-debugbar/src/DataCollector/ViewCollector.php (line 137) :
if (!$this->collect_data) {
$params = array_keys($view->getData());
} else {
$data = [];
foreach ($view->getData() as$key => $value) {
// current :// $data[$key] = $this->getDataFormatter()->formatVar($value);// test using json_encode() :$data[$key] = json_encode($value, JSON_PRETTY_PRINT);
}
$params = $data;
}
What do you think about the idea ?
Obviously, it's perfectible, it's just a POC, I think we should try to improve the DataFormatter, it's just to show an example of what I would like to see.
Thanks in advance,
Max
The text was updated successfully, but these errors were encountered:
Hello,
Thanks for debugbar that is really useful !
I just have an issue with the view data collector that is not displaying objects but only the class name (even with options.views.data = true) :
It's really annoying because a lot of data are class in Laravel, like the models.
I tried a little fix in vendor/barryvdh/laravel-debugbar/src/DataCollector/ViewCollector.php (line 137) :
What do you think about the idea ?
Obviously, it's perfectible, it's just a POC, I think we should try to improve the DataFormatter, it's just to show an example of what I would like to see.
Thanks in advance,
Max
The text was updated successfully, but these errors were encountered: