mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
改进Model类
This commit is contained in:
@@ -853,10 +853,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
|
||||
if (!isset(self::$links[$model])) {
|
||||
self::$links[$model] = Db::connect(static::$connection);
|
||||
}
|
||||
if (isset(static::$tableName)) {
|
||||
self::$links[$model]->setTable(static::$tableName);
|
||||
} else {
|
||||
$name = basename(str_replace('\\', '/', $model));
|
||||
self::$links[$model]->name($name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user