runner / fastd-eloquent
FastD 框架的 eloquent
v1.0.12
2019-11-25 16:09 UTC
Requires
- fastd/fastd: ~3.0
- illuminate/database: ^5.5
- illuminate/events: ^5.6
- illuminate/pagination: ^5.5
README
在 FastD 中的 illuminate/database
功能
- 支持 Eloquent ORM
- 支持分页
- 中间件捕获 NotFoundException
安装
composer require runner/fastd-eloquent
使用
配置服务提供者
\Runner\FastdEloquent\EloquentServiceProvider::class
事件和观察者
如果需要使用模型事件或观察者,需要注册服务提供者
\Runner\FastdEloquent\EventServiceProvider::class
并增加配置 event.php
<?php return [ 'listen' => [ CustomEvent::class => [ CustomListener::class, ], ], 'observer' => [ CustomModel::class => CustomObserver::class, ], ];