增加 自动添加 minute_at

This commit is contained in:
iVampireSP.com 2022-11-23 02:44:24 +00:00
parent 9828b22741
commit d85cf86f79

View File

@ -98,6 +98,7 @@ protected static function boot()
static::creating(function ($model) { static::creating(function ($model) {
$model->hour_at = now()->hour; $model->hour_at = now()->hour;
$model->minute_at = now()->minute_at;
if ($model->price !== null) { if ($model->price !== null) {
$model->price = round($model->price, 2); $model->price = round($model->price, 2);