Skip to content

Commit b6233fd

Browse files
committed
update getRelationCountHash
1 parent 1edd06d commit b6233fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BaseRelation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ public function getRelationQuery(
130130
*
131131
* @return string
132132
*/
133-
public function getRelationCountHash()
133+
public function getRelationCountHash($incrementJoinCount = true)
134134
{
135-
return 'nested_set_'.self::$selfJoinCount++;
135+
return 'nested_set_'.($incrementJoinCount ? static::$selfJoinCount++ : static::$selfJoinCount);
136136
}
137137

138138
/**
@@ -208,4 +208,4 @@ protected function matchForModel(Model $model, EloquentCollection $results)
208208

209209
return $result;
210210
}
211-
}
211+
}

0 commit comments

Comments
 (0)