mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 13:31:38 +08:00
Model类增加全局查询范围定义 改进Query类
This commit is contained in:
@@ -964,7 +964,10 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
} else {
|
||||
$query->name($this->name);
|
||||
}
|
||||
|
||||
// 全局作用域
|
||||
if (method_exists($this, 'base')) {
|
||||
call_user_func_array([$this, 'base'], [ & $query]);
|
||||
}
|
||||
self::$links[$model] = $query;
|
||||
}
|
||||
// 返回当前模型的数据库查询对象
|
||||
|
||||
Reference in New Issue
Block a user