List From a Model - Form and Save from another Model with Relationship
I have a table with Products (I have all the basic info) and another table ExtraFieldProduct (extra fields for the products).
What I would need is to list the products in the table, but when I click on a record send the id to the ExtraFieldProduct Form, set the id to product_id and then fill in the form to create or edit.
Thanks!!!
4 Replies
Just a thought : It may be easier to automatically create the related
ExtraFieldProduct
when a Product
is created... Then you can add an action in the Products table that takes you to edit the extra fields.I got the product information from a webhook, but some times we need add extra fields
because of this i make two tables
Makes sense, I think I understand. Here's what I have in mind... maybe you can adapt it a bit more for your needs :
Check out the docs on listing actions for more examples :
https://filamentphp.com/docs/2.x/admin/resources/listing-records#actions
thanks, i going to read.