讨论数量:
在 BaseModel 中添加
public static function getInstance(): self
{
return new static();
}
public static function getDB(array $scope = [])
{
return self::getInstance()->db($scope);
}
查询
SystemUser::getDB()->where()...
推荐文章: