Trouble with a read-only field for a model relationship
I have a model
SystemLog
with a relationship retryingUser
.
When I save the form - I'm getting the error Add fillable property [retryingUser] to allow mass assignment on [App\Models\SystemLog].
Even though I've got the field set as disable, readOnly and dehydrated = false.
So I think Filament really shouldn't be trying to save the field - but I must have something wrong!
I want to display the value, but it's not editable at all. Any suggestions for what I should be doing differently?
Here's an excerpt from mySystemLogResource
:
3 Replies
Would be better to use a Select Field instead ,
Or a Placeholder would be best
Thanks @Majid Al Zariey
placeholder looks like it might be the one - many thanks!
To understand what's happening though - from reading the docs - it shouldn't make much difference, since Filament shouldn't be trying to save the value anyway. With disabled, readOnly and dehydrated(false)
My guess: The issue might come from using the dot syntax here.