Last active
April 26, 2019 18:01
-
-
Save dadamssg/61dabf18762f809f7afc1a1c04707f2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface DBTransaction { | |
public function begin(); | |
public function commit(); | |
public function rollback(); | |
} | |
class LaravelDBTransaction implements DBTransaction { | |
public function begin() | |
{ | |
DB::beginTransaction(); | |
} | |
public function commit() | |
{ | |
DB::commit(); | |
} | |
public function rollback() | |
{ | |
DB::rollback(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment