Ken hace 1 semana
padre
commit
8fad77cc7c
Se han modificado 1 ficheros con 0 adiciones y 8 borrados
  1. 0 8
      app/Http/Controllers/admin/Home.php

+ 0 - 8
app/Http/Controllers/admin/Home.php

@@ -32,14 +32,6 @@ class Home extends Controller
             $query = PaymentOrder::query();
             $query->where('type', 2)->whereBetween('created_at', [$start, $end]);
             $query1 = clone $query;
-            $sql  = $query1->toSql();
-            $bindings = $query1->getBindings();
-            // 将绑定的参数替换到 SQL 查询中
-            foreach ($bindings as $binding) {
-                // 使用 ? 替换成绑定的值
-                $sql = preg_replace('/\?/', "'" . addslashes($binding) . "'", $sql, 1);
-            }
-
             $totalAmount = (float)$query1->sum('amount');
             $query1 = clone $query;
             $totalSuccess = (float)$query1->whereIn('status', [1, 2])->sum('amount');