mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-08-30 12:45:32 +08:00
调整HasMany类的has和hasWhere方法,取消第一个参数
This commit is contained in:
@@ -1237,9 +1237,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
{
|
||||
$model = new static();
|
||||
if (is_array($operator) || $operator instanceof \Closure) {
|
||||
return $model->$relation()->hasWhere($model, $operator);
|
||||
return $model->$relation()->hasWhere($operator);
|
||||
}
|
||||
return $model->$relation()->has($model, $operator, $count, $id);
|
||||
return $model->$relation()->has($operator, $count, $id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1252,7 +1252,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
public static function hasWhere($relation, $where = [])
|
||||
{
|
||||
$model = new static();
|
||||
return $model->$relation()->hasWhere($model, $where);
|
||||
return $model->$relation()->hasWhere($where);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user