Ken 10 ساعت پیش
والد
کامیت
fa6c91cb2c
2فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 7 0
      app/Http/Controllers/admin/ActivityUser.php
  2. 1 1
      app/Models/ActivityUser.php

+ 7 - 0
app/Http/Controllers/admin/ActivityUser.php

@@ -77,6 +77,13 @@ class ActivityUser extends Controller
                 ->with(['member'])
                 ->orderByDesc('id')
                 ->forPage($page, $limit)->get()->toArray();
+            foreach ($list as &$item)
+            {
+                $item['gift_amount'] = floatval($item['gift_amount']);
+                $item['effective_betting_amount'] = floatval($item['effective_betting_amount']);
+                $item['betting_amount'] = floatval($item['betting_amount']);
+            }
+
             $result = ['total' => $count, 'data' => $list];
         } catch (ValidationException $e) {
             return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());

+ 1 - 1
app/Models/ActivityUser.php

@@ -26,7 +26,7 @@ class ActivityUser extends BaseModel
     protected $fillable = ['activity_id',
         'finish_time', 'member_id', 'title', 'status', 'sub_title', 'detail_image',
         'start_time', 'end_time', 'part_in_time',
-        'effective_betting_amount', 'gift_amount',
+        'effective_betting_amount', 'gift_amount','betting_amount',
 
     ];