Argument #1 ($values) must be of type array, string given
Pardon, I don't understand what the error is? I'm trying create comment for topic. I got these error.
Thank you.
16 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
the error is changed.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
$feeling = $topic
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Did you try google? This is a php issue not filament. You need to test data is array so do:
$data = $this->form->getState() ?? [];
The feeling is because you need to mount feeling first
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
if its a livewire component you should use mount()
Shaun, you need to add it to mount as Dan and myself have mentioned. There is no feeling->Id since feeling doesn’t exist.
Define it in your mount function.
Yes. I defined it. Thank you. but now relationship problem here. damn.
please read and try to debug the error yourself before sending it to us
looks like a migration or $fillable problem
Thank you. I'm trying my best.
You may find ChatGPT more useful if you provide it with good information to problem solve. Failing that google, then us 🙂
Thank you.
Thank you all. I'm so sorry that I made you disappointed. I forgot to pass the data in the component.
So feeling_id gives me null.
Thank you. This was helpful.
And I don't need to add it mount when I use it like this.
You do, that just defines the type it doesn't add the values.