mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进
This commit is contained in:
@@ -365,9 +365,11 @@ class BelongsToMany extends Relation
|
||||
*/
|
||||
public function getRelationCountQuery($closure, &$name = null)
|
||||
{
|
||||
$return = call_user_func_array($closure, [ & $this->query]);
|
||||
if ($return && is_string($return)) {
|
||||
$name = $return;
|
||||
if ($closure) {
|
||||
$return = call_user_func_array($closure, [ & $this->query]);
|
||||
if ($return && is_string($return)) {
|
||||
$name = $return;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [
|
||||
|
||||
Reference in New Issue
Block a user