Browse Source

added dataaccess transaction

tags/0.1.7^0
Robin Thoni 8 years ago
parent
commit
53f9928884
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/Utils/LuDataAccess.php

+ 8
- 0
src/Utils/LuDataAccess.php View File

@@ -2,7 +2,15 @@
2 2
 
3 3
 namespace Luticate\Utils;
4 4
 
5
+use DB;
6
+
5 7
 abstract class LuDataAccess {
8
+
9
+    public static function transact(\Closure $function)
10
+    {
11
+        DB::transaction($function);
12
+    }
13
+
6 14
     /**
7 15
      * @param $data LuModel[]
8 16
      * @return LuDbo[]

Loading…
Cancel
Save