cannonsir/laravel-transaction-middleware
Composer 安装命令:
composer require cannonsir/laravel-transaction-middleware
包简介
Database transaction middleware for Laravel
README 文档
README
This is a middleware used to open database transactions in the request. If an exception is thrown during the request execution, the SQL statements executed in the whole request will be rolled back
Usage
You just need to use
transactionmiddleware
Using Middleware in routing
Route::middleware('transaction')->resource('users', 'UserController');
Using middleware in the controller constructor
public function __construct() { $this->middleware('transaction'); }
Requirements
- laravel
>= 5.5
Install
$ composer require cannonsir/laravel-transaction-middleware
Uninstall
$ composer remove cannonsir/laravel-transaction-middleware
License
MIT License. See the LICENSE file.
统计信息
- 总下载量: 275
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-11-27