Looking to hire Laravel developers? Try LaraJobs
This package is not available.

rxy-laravel-extend-database maintained by impecty

Description
Package description here.
Author
Last update
2019/09/29 11:49 (dev-master)
License
Links
Downloads
0

Comments
comments powered by Disqus

Installing

$ composer require Impecty/laravel-extend-database

描述

这是针对于laravel的观察者模型在进行完善的扩展

Model::where('id', '1')->update([
  'name' => 'laravel'
]);

如上的方式修改或者删除而观察者事件失效进一步扩展该功能,使用的方式只需要在模型中引用Impecty\LaravelExtend\Database\Eloquent\SEvents即可

use Illuminate\Database\Eloquent\Model;
use Impecty\LaravelExtend\Database\Eloquent\SEvents;

class Category extends Model
{
    use SEvents;
}