没有合适的资源?快使用搜索试试~ 我知道了~
attribute-events::fire:因口才模型的属性更改而引发事件
共28个文件
php:19个
md:2个
yml:2个
需积分: 9 0 下载量 201 浏览量
2021-04-15
09:34:18
上传
评论
收藏 31KB ZIP 举报
温馨提示
class Order extends Model { protected $ dispatchesEvents = [ 'status:shipped' => OrderShipped ::class, 'note:*' => OrderNoteChanged ::class, ]; } 雄辩的模型会在其整个生命周期中触发一些方便的事件,例如created和deleted 。 但是,在模型的生命周期中通常会发生更多具有业务意义的事件。 使用该库,您可以通过将属性更改映射到自己的事件类来捕获这些事件。 安装 composer require jpkleemans/attribute-events 如何使用它 在模型中使用Kleemans\AttributeEvents特性,然后将属性添加到$dispatchesEvents属性中: cla
资源推荐
资源详情
资源评论
收起资源包目录
attribute-events-master.zip (28个子文件)
attribute-events-master
composer.json 855B
.travis.yml 112B
composer.lock 177KB
test
Fake
Order.php 2KB
Events
OrderMadeFree.php 158B
OrderMetaUpdated.php 161B
OrderUpdated.php 157B
OrderShippingCountryChanged.php 172B
OrderPlaced.php 156B
OrderShipped.php 157B
OrderDeleted.php 157B
OrderNoteUpdated.php 161B
InvoiceDownloaded.php 162B
OrderCanceled.php 158B
OrderPaidHandlingFee.php 165B
OrderTaxCleared.php 160B
OrderPaidWithCash.php 162B
OrderPaid.php 154B
OrderReturned.php 158B
PaypalPaymentDenied.php 164B
AttributeEventsTest.php 12KB
.php_cs 264B
LICENSE 1KB
src
AttributeEvents.php 4KB
.gitignore 17B
CHANGELOG.md 2KB
.styleci.yml 14B
README.md 4KB
共 28 条
- 1
资源评论
按剑四顾
- 粉丝: 24
- 资源: 4622
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功