Ken 3 ngày trước cách đây
mục cha
commit
af6a62adbb
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      app/Models/PaymentOrder.php
  2. 1 1
      app/Services/PaymentOrderService.php

+ 1 - 1
app/Models/PaymentOrder.php

@@ -20,7 +20,7 @@ class PaymentOrder extends Authenticatable
     protected $fillable = ['type', 'order_no', 'member_id', 'amount', 'channel', 'bank_name', 'account', 'card_no', 'status', 'callback_url', 'callback_data', 'remark', 'pay_no', 'pay_url', 'pay_data', 'fee'];
 
 
-    public function user()
+    public function userInfo()
     {
         return $this->belongsTo(User::class, 'member_id', 'member_id')->select(['member_id','username','first_name']);
     }

+ 1 - 1
app/Services/PaymentOrderService.php

@@ -106,7 +106,7 @@ class PaymentOrderService extends BaseService
     {
         $limit = isset($search['limit']) ? $search['limit'] : 15;
         $paginator = self::model()::where(self::getWhere($search))
-            ->with(['user'])
+            ->with(['userInfo'])
             ->paginate($limit);
         return ['total' => $paginator->total(), 'data' => $paginator->items()];
     }