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