therezor/laravel-transactional-jobs
最新稳定版本:1.1.6
Composer 安装命令:
composer require therezor/laravel-transactional-jobs
包简介
Submit laravel jobs inside transaction. Cancel job after rollback. Proceed after successful commit.
README 文档
README
Note
Laravel 10 and newer versions natively support transactional job handling without the need for this package.
Problem:
Solution:
By using this package you easily dispatch jobs inside transactions. Cancel job on transaction rollback. Add to queue on transaction committed.
Installation
This package requires PHP 7.1 and Laravel 5.8 or higher. If you are on a PHP version below 7.1 or a Laravel version below 5.8 just use an older version of this package.
-
Run
composer require therezor/laravel-transactional-jobsin your laravel project root folder -
Implement
TheRezor\TransactionalJobs\Contracts\RunAfterTransactionto jobs that run in the middle of database transactions
<?php use TheRezor\TransactionalJobs\Contracts\RunAfterTransaction; class MySuperJob implements ShouldQueue, RunAfterTransaction { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; ... }
统计信息
- 总下载量: 439.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 44
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-26

