Closed guoxiangke closed 2 months ago
Unable to reproduce the issue, please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)
In the document(Field Hydration): https://nova.laravel.com/docs/resources/fields.html#field-hydration it's provide a $model in the fillUsing function. I just wonder what if create a new entity of a model, but the $model still not exist.
Still need the reproducing repository as I have no idea why it isn't working on your usage, also we don't have any other report regarding this widely used feature.
Hey there,
We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.
hi, I use
Text::make('Name', 'name') ->fillUsing(function ($request, $model, $attribute, $requestAttribute) { $model->{$attribute} = Str::title($request->input($attribute)); }),
but it said Undefined variable $model. Where can I get current $model? what if this is a create page? thanks.