u
This commit is contained in:
@@ -100,6 +100,7 @@ class Wechat
|
|||||||
->build();
|
->build();
|
||||||
|
|
||||||
dump(Payment::create([
|
dump(Payment::create([
|
||||||
|
'trade_no' => time().rand(100000, 999999),
|
||||||
'order_id' => $order->id,
|
'order_id' => $order->id,
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ class Payment extends Model
|
|||||||
{
|
{
|
||||||
protected $autoWriteTimestamp = true;
|
protected $autoWriteTimestamp = true;
|
||||||
|
|
||||||
public function onBeforeInsert()
|
|
||||||
{
|
|
||||||
$this->trade_no = time();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function orders(): BelongsTo
|
public function orders(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Order::class);
|
return $this->belongsTo(Order::class);
|
||||||
|
|||||||
Reference in New Issue
Block a user