HOW TO USE DB TRANSACTION

i have a wizard form in 3 steps each steps have a different relationship i try dd() on last tab and save it but first step and second step saved into db thx u dev
5 Replies
jepewsykes
jepewsykesOP11mo ago
@anyone
Sdeev
Sdeev9mo ago
did you find the solution of the transaction or a similar solution
Sdeev
Sdeev9mo ago
class CreateSalesOrder extends CreateRecord { use HasWizard; protected static string $resource = SalesOrderResource::class; public function form(Form $form): Form { return parent::form($form) ->schema([ Wizard::make($this->getSteps()) ->startOnStep($this->getStartStep()) ->cancelAction($this->getCancelFormAction()) ->submitAction($this->getSubmitFormAction()) ->skippable($this->hasSkippableSteps()) ->contained(false), ]) ->columns(null); } /** @return Step[] */ protected function getSteps(): array { return [ Step::make('Order Details') ->schema([ Section::make()->schema(SalesOrderResource::getDetailsFormSchema())->columns(), ]), Step::make('Order Items') ->schema([ Section::make()->schema([ SalesOrderResource::getItemsRepeater(), ]), ]), ]; } how to use tha transaction on here ?
jepewsykes
jepewsykesOP9mo ago
ya bro
Want results from more Discord servers?
Add your server