Skip to content

Commit

Permalink
Updated hasManyViaMany getRelationCountHash declaration to match lara…
Browse files Browse the repository at this point in the history
…vel 8 (#16)
  • Loading branch information
Xulai authored Jan 14, 2021
1 parent e64ed81 commit 6b56305
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Relations/HasManyViaMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,11 @@ public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder
/**
* Get a relationship join table hash.
*
* @param bool $incrementJoinCount
* @return string
*/
public function getRelationCountHash()
public function getRelationCountHash($incrementJoinCount = true)
{
return 'laravel_reserved_' . static::$selfJoinCount++;
return 'laravel_reserved_' . ($incrementJoinCount ? static::$selfJoinCount++ : static::$selfJoinCount);
}
}

0 comments on commit 6b56305

Please sign in to comment.