Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BaseRelation.php #481

Open
wants to merge 8 commits into
base: v5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
[![Latest Unstable Version](https://poser.pugx.org/kalnoy/nestedset/v/unstable.svg)](https://packagist.org/packages/kalnoy/nestedset)
[![License](https://poser.pugx.org/kalnoy/nestedset/license.svg)](https://packagist.org/packages/kalnoy/nestedset)

This is a Laravel 4-8 package for working with trees in relational databases.

* **Laravel 5.7, 5.8, 6.0, 7.0, 8.0** is supported since v5
* **Laravel 5.5, 5.6** is supported since v4.3
* **Laravel 5.2, 5.3, 5.4** is supported since v4
* **Laravel 5.1** is supported in v3
* **Laravel 4** is supported in v2
This is a Laravel 4-8 package for working with trees for LARAVEL8(Speacial)(edit by aliqasemi) in relational databases.

Although this project is completely free for use, I appreciate any support!

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "kalnoy/nestedset",
"name": "nestedset/willaarts",
"description": "Nested Set Model for Laravel 5.7 and up",
"keywords": ["laravel", "nested sets", "nsm", "database", "hierarchy"],
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions src/BaseRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ public function getRelationQuery(
*
* @return string
*/
public function getRelationCountHash()
public function getRelationCountHash($incrementJoinCount = true)
{
return 'nested_set_'.self::$selfJoinCount++;
return 'nested_set_'.($incrementJoinCount ? self::$selfJoinCount++ : self::$selfJoinCount);
}

/**
Expand Down Expand Up @@ -208,4 +208,4 @@ protected function matchForModel(Model $model, EloquentCollection $results)

return $result;
}
}
}