|
|
@@ -58,7 +58,12 @@ class Withdraw extends Controller
|
|
|
->orderBy('status')
|
|
|
->orderByDesc('created_at')
|
|
|
->forpage($page, $limit)->get();
|
|
|
- $result = ['total' => $count, 'data' => $list];
|
|
|
+
|
|
|
+ $amountTotal = $query->where($where)->sum('amount');
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $result = ['amount_total'=>$amountTotal,'total' => $count, 'data' => $list];
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
|
|
|
} catch (Exception $e) {
|