How to use DB Transaction with Repository Pattern in Laravel?
07-06-2017In Laravel framework, we can use following transaction block with repository pattern and classic eloquent usage:
DB::transaction(function () use ($talep, $input,$id) { UrunTalep::where('talep_id', '=', $talep->id)->forceDelete(); $talep = $this->talepRepository->update($input, $id); });