Browser type and version: Chrome 130.0.6723.117 (arm64)
Description:
We updated our composer dependencies which upgraded Nova from 4.34.3 to 4.35.4
Now it seems that displayUsing, without passing $attribute to the field (e.g. Text), does not show anything in Index Views anymore.
The below example has worked without any issues previously.
Detailed steps to reproduce the issue on a fresh Nova installation:
<?php
namespace App\Nova;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
class User extends Resource
{
public static $model = \App\Models\User::class;
public function fieldsForIndex(NovaRequest $request): array
{
return [
Text::make('E-Mail')
->displayUsing(fn () => $this->email),
];
}
public function fields(NovaRequest $request): array
{
return [];
}
}
Yes, referencing any attribute existing in the DB (e.g. id) fixes the example above.
The problem comes with snippets like these where this is not really applicable, which also broke:
We just updated our dependencies due to CVE-2024-50345 and now the exact same annoying problem. There is nothing to be found in the Nova release notes.
mariadb
10.8Description:
We updated our composer dependencies which upgraded Nova from
4.34.3
to4.35.4
Now it seems thatdisplayUsing
, without passing$attribute
to the field (e.g.Text
), does not show anything in Index Views anymore.The below example has worked without any issues previously.
Detailed steps to reproduce the issue on a fresh Nova installation:
Additional info
API Response from
$.resources[0].fields[0]
4.35.4
4.34.3
"Just reference the attribute"
Yes, referencing any attribute existing in the DB (e.g.
id
) fixes the example above.The problem comes with snippets like these where this is not really applicable, which also broke: