1 | <?php |
||
10 | class TransactionMiddleware implements Middleware |
||
11 | { |
||
12 | /** |
||
13 | * The database manager instance. |
||
14 | * |
||
15 | * @var \Illuminate\Database\DatabaseManager |
||
16 | */ |
||
17 | protected $database; |
||
18 | |||
19 | /** |
||
20 | * Create a new transaction middleware. |
||
21 | * |
||
22 | * @param \Illuminate\Database\DatabaseManager $database |
||
23 | */ |
||
24 | public function __construct(DatabaseManager $database) |
||
28 | |||
29 | /** |
||
30 | * Wrap a command execution in a database transaction. |
||
31 | * |
||
32 | * @param object $command |
||
33 | * @param callable $next |
||
34 | * @return mixed |
||
35 | * |
||
36 | * @throws Exception |
||
37 | * @throws Throwable |
||
38 | */ |
||
39 | public function execute($command, callable $next) |
||
59 | } |
||
60 |