This commit is contained in:
2022-09-09 17:08:19 +08:00
parent 0270a2ca32
commit 7dbe121302
2 changed files with 1 additions and 5 deletions

View File

@@ -100,6 +100,7 @@ class Wechat
->build();
dump(Payment::create([
'trade_no' => time().rand(100000, 999999),
'order_id' => $order->id,
]));

View File

@@ -9,11 +9,6 @@ class Payment extends Model
{
protected $autoWriteTimestamp = true;
public function onBeforeInsert()
{
$this->trade_no = time();
}
public function orders(): BelongsTo
{
return $this->belongsTo(Order::class);