SaleObserver.php 568 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2018/11/1
  6. * Time: 9:04
  7. */
  8. namespace app\backend\modules\goods\observers;
  9. use Illuminate\Database\Eloquent\Model;
  10. class SaleObserver extends \app\common\observers\BaseObserver
  11. {
  12. public function saving( $model)
  13. {
  14. // if (!empty($model->id) &&$model->isDirty()) {
  15. // (new \app\common\services\operation\SaleLog($model, 'update'));
  16. // }
  17. }
  18. public function updating( $model)
  19. {
  20. (new \app\common\services\operation\SaleLog($model, 'update'));
  21. }
  22. }