From 4d6fa3ce38a54cc84606c1c2deb5bcb984d8176d Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 15 Sep 2022 17:02:30 +0800 Subject: [PATCH] u --- app/model/Payment.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/Payment.php b/app/model/Payment.php index 7868cf9..6190eba 100644 --- a/app/model/Payment.php +++ b/app/model/Payment.php @@ -23,6 +23,8 @@ class Payment extends Model */ public function paid() { + $this->orders()->save(['status' => 1]); + $this->paid_at = Carbon::now(); // 更新支付时间为当前时间 $this->status = 1; $this->save();