Laravel打印该查询的SQL语句
$query = PayoneerAccount::where([ 'ap_cid' => $apCid, 'payoneer_id' => $payoneerId, 'state' => $state, ]); $sql = $query->toSql(); $bindings = $query->getBindings(); foreach ($bindings as $binding) { $value = is_numeric($binding) ? $binding : "'{$binding}'"; $sql = preg_replace('/\?/', $value, $sql, 1); } dd($sql);