Auto Creating Child Model from Parent Resource
Hello, I have two Resources/modes, Appointment and Client
Every appointment has a BelongsTo relation called client()
Clients have hasMany appointments.
I created the resources with --generate, and on the appointments create page, I can only put in the details of the appointment and choose an existing client from a select box.
However, I want to create the client while Im creating the appointment. In other words, I want the fields of client creation to be shown in the appointment creation page, and on submit filament should first create the client, and then automatically handle the relationship.
I have tried relationshipmanager and it only works for editing and viewing but not creating.
I have tried to add the client fields manually
but it gives an error that client_id is required
Is this possible?
0 Replies