wizard step create record on first step
on a wizard on create i would like to create record on first step
i see i can call ->afterValidation(function(?Model $record,$state){
so i can create record .. but i don't know to set it for calling it in the second record
2 Replies
You can use session or closure setters / gettings.
But be careful as you will need to override the native submit function of the wizard as it will try and create it again when you submit it.
This also breaks going back natively, so you'd need to condition that too or prevent going backwards.
in the second step i must put