How to create a new table and its relationship at the same time?

I have a database as shown below, I want to create 2 tables at the same time and I have created the detail_units table and I want the id value of this table to be retrieved and used in the dishes table without having to select. Is that really possible?
No description
5 Replies
awcodes
awcodes4mo ago
Sorry, not sure exactly what you are asking and how it applies to Filament.
This PC
This PC4mo ago
Is there a way for me to select a field that can be saved in 2 different places?
No description
Vp
Vp4mo ago
First saved from resource, and you update others table using afterCreate()
This PC
This PC4mo ago
many thanks for your help