Help to create a custom fields (comments)
Hi ! Is there someone here who could help me to create a custom fields list and add comments ? I followed the docs but can't make it work 😦
7 Replies
Does your model allow saving?
i.e. is message in fillable?
I would dd($comment) inside your addComment function.
Yep fields are fillable. The wire:model seems not to work, and if I click "Add", I have an error "Unable to call component method. Public method [addComment] not found on component: [app.filament.resources.missions-resource.pages.edit-missions]"
It seems to call page method and not field method 🤔
I have a feeling it is because you are entangling it into the parent's statePath. But you don't want to do that as you want to add it based on an action
Why are you using a customfield? Why not just use a relationship to render the comments?
I just want to make a custom layout to display them (like the date + image on the side + comment)
I don't know if it's a good idea. Maybe it's more simple to use a Repeater or a RelationManager and customize it, I don't know 😦
I would use a relationship and have the comments below the edit page in the relationship doing exactly as you want them
a column for the Date, Image and message