增加 自动添加 minute_at
This commit is contained in:
parent
9828b22741
commit
d85cf86f79
@ -98,6 +98,7 @@ protected static function boot()
|
||||
|
||||
static::creating(function ($model) {
|
||||
$model->hour_at = now()->hour;
|
||||
$model->minute_at = now()->minute_at;
|
||||
|
||||
if ($model->price !== null) {
|
||||
$model->price = round($model->price, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user