Ken 2 週間 前
コミット
e18349e14d
2 ファイル変更6 行追加1 行削除
  1. 1 1
      app/Http/Controllers/admin/Bet.php
  2. 5 0
      app/Models/Bet.php

+ 1 - 1
app/Http/Controllers/admin/Bet.php

@@ -34,7 +34,7 @@ class Bet extends Controller
             $limit = request()->input('limit', 10);
 
             $query = BetModel::where(BetService::getWhere($params))
-                ->with(['user', 'issue']);
+                ->with(['user', 'issue','pcIssue']);
 
 
             if (isset($params['username']) && !empty($params['username'])) {

+ 5 - 0
app/Models/Bet.php

@@ -11,6 +11,11 @@ class Bet extends BaseModel
     const STATUS_SETTLED = 2;
     const STATUS_CANCEL = 3;
 
+    function pcIssue()
+    {
+        return $this->belongsTo(PcIssue::class, 'issue_no', 'issue_no');
+    }
+
     function issue()
     {
         return $this->belongsTo(Issue::class, 'issue_no', 'issue_no');