runner/fastd-eloquent

eloquent for FastD framework

v1.0.12 2019-11-25 16:09 UTC

This package is auto-updated.

Last update: 2024-11-26 13:28:04 UTC


README

illuminate/database In FastD.

Features

  • 支持 Eloquent ORM
  • 支持 Pagination
  • 中间件捕获 NotFoundException

Installation

composer require runner/fastd-eloquent

Usage

配置服务提供者

\Runner\FastdEloquent\EloquentServiceProvider::class

Event and Observer

如果需要用到模型事件或 Observer, 需要注册服务提供者

\Runner\FastdEloquent\EventServiceProvider::class

并增加配置 event.php

<?php
return [
    'listen' => [
        CustomEvent::class => [
            CustomListener::class,    
        ],
    ],
    'observer' => [
        CustomModel::class => CustomObserver::class,    
    ],
];

Document