50% Off/-

50% Off/-

Php

50% Off/-

50% Off/-

Web

50% Off/-

50% Off/-

How to use DB Transaction with Repository Pattern in Laravel?

07-06-2017

In 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);
        });
       

© 2019 Tüm Hakları Saklıdır. Codesenior.COM