multiple models with relationships with Wizard Steps
Hi, I am using a Wizard Step with a model on a custom page to create and edit the model. I am having issues with SpatieMediaUpload which doesn't save the relation the first time on create but works well on edit. Sample code below
The form isn't saved when saveKyc is run the first time (on wizard next) but the function saves the relationships if it's run a second time (going previous and next on the wizard). I am looking for a way to save a multi model form with attachments via SpatieMedia.
1 Reply
this works correctly if we use multiple forms instead of this->form, then can we cannot use the wizard component. Most probably an issue on this line on create.
`
$this->form->model($this->kyc)->saveRelationships();