We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d234a99 commit 2acac81Copy full SHA for 2acac81
src/Components/BaseModelBrowser.php
@@ -259,10 +259,11 @@ protected function format($data)
259
{
260
$data->transform(function ($item) {
261
foreach ($this->formats as $attribute => $format) {
262
- if (! isset($item->{$attribute})) {
+ $value = Arr::get($item, $attribute);
263
+ if ($value === null) {
264
continue;
265
}
- $item->{$attribute . 'Formatted'} = $format($item->{$attribute}, $item);
266
+ $item->{$attribute . 'Formatted'} = $format($value, $item);
267
268
269
return $item;
0 commit comments