We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cc755b commit 0eb7c36Copy full SHA for 0eb7c36
src/Builder.php
@@ -79,13 +79,15 @@ public function getConnection()
79
* @return static
80
* @throws Exception
81
*/
82
- public function table($tableName)
+ public function table($tableName = '')
83
{
84
- if (strpos($tableName, '{{') === false) {
85
- $tableName = '{{%' . $tableName . '}}';
86
- }
87
- if (!preg_match('/^\{\{%?[\w\-\.\$]+%?\}\}$/', $tableName)) {
88
- throw new Exception('表名错误');
+ if (!empty($tableName)) {
+ if (strpos($tableName, '{{') === false) {
+ $tableName = '{{%' . $tableName . '}}';
+ }
+ if (!preg_match('/^\{\{%?[\w\-\.\$]+%?\}\}$/', $tableName)) {
89
+ throw new Exception('表名错误');
90
91
}
92
$this->table = $tableName;
93
return $this;
0 commit comments