mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
修正M函数和Model类 支持传入空白的表前缀
例如 M('User','') 或者 Loader::table('User',['prefix'=>'']);
This commit is contained in:
@@ -76,6 +76,8 @@ class Model
|
||||
|
||||
if (!empty($config['prefix'])) {
|
||||
$this->tablePrefix = $config['prefix'];
|
||||
} elseif ('' === $config['prefix']) {
|
||||
$this->tablePrefix = '';
|
||||
} elseif (is_null($this->tablePrefix)) {
|
||||
$this->tablePrefix = Config::get('database.prefix');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user