Skip to content

Instantly share code, notes, and snippets.

@dadamssg
Last active April 26, 2019 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dadamssg/61dabf18762f809f7afc1a1c04707f2e to your computer and use it in GitHub Desktop.
Save dadamssg/61dabf18762f809f7afc1a1c04707f2e to your computer and use it in GitHub Desktop.
<?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