改进 返回内容

This commit is contained in:
iVampireSP.com 2023-02-01 00:46:52 +08:00
parent ae32ddedcd
commit 498030fcf7
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -54,6 +54,11 @@ protected static function boot()
});
static::created(function (self $model) {
$model->load('module');
// model price 使用 bcmul 保留两位小数
$model->price = bcmul($model->price, 1, 2);
$model->user->notify(new WebNotification($model, 'hosts.created'));
});