boing6002/versioning
Composer 安装命令:
composer require boing6002/versioning
包简介
Prevents update conflicts using the optimistic lock pattern in Laravel
README 文档
README
Prevents update conflicts using the optimistic lock pattern in Laravel
Details
- the package creates a
versioningstable where it holds versions for all the versionable models - by using the
Versionabletrait on a model versioning is handled automatically - by default the trait appends a
versionattribute after the model is retrieved used for tracking versions and expects the same attribute to be present on the model when the update is called - the default versioning attribute can be customized by using
protected $versioningAttribute = 'customVersionAttribte'on the model - the trait can be used on models that already have records in the database, the versioning starts with the first retrieval of those models
- when a versionable model is deleted its versioning is deleted also. If the model uses
SoftDeletesthe versioning is deleted only on modelforceDelete - throws a
ConflictHttpExceptionif the version is incorrect - tests are included with the package
- package comes included by default with Enso
Configuration & Usage
Be sure to check out the full Enso documentation at docs.laravel-enso.com
Contributions
are welcome. Pull requests are great, but issues are good too.
License
This package is released under the MIT license.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-25