From c444de4815fc8bab6667cf34787ed7be5c029ff0 Mon Sep 17 00:00:00 2001 From: whwyy Date: Fri, 13 Dec 2024 14:35:04 +0800 Subject: [PATCH] eee --- Traits/QueryTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index deca613..941dc04 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -401,7 +401,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq public function from(string|Closure $tableName): static { if ($tableName instanceof Closure) { - $this->from = $this->makeClosureFunction($tableName); + $this->from = '(' . $this->makeClosureFunction($tableName) . ')'; } else if (class_exists($tableName)) { $this->from = (new $tableName)->getTable(); } else {