支付完成,更新状态

This commit is contained in:
2022-09-15 17:05:22 +08:00
parent 4d6fa3ce38
commit ee6d826334
2 changed files with 3 additions and 3 deletions

View File

@@ -23,8 +23,6 @@ class Payment extends Model
*/
public function paid()
{
$this->orders()->save(['status' => 1]);
$this->paid_at = Carbon::now(); // 更新支付时间为当前时间
$this->status = 1;
$this->save();