-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
TaggedToMany Relationship #514
base: main
Are you sure you want to change the base?
Conversation
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.6.0 to 2.1.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](dependabot/fetch-metadata@v1.6.0...v2.1.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
…a type when mass syncing tags with a type
…t differentiate between tags not using type in any case.
Fixed links to documentation pages
…ependabot/fetch-metadata-2.1.0 Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](dependabot/fetch-metadata@v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…ependabot/fetch-metadata-2.2.0 Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0
Added support for translation via JSON fields for PostgreSQL
bugfix: fixes the syncWithType method to avoid deleting tags without …
Hi @edstevo, thanks for your work on this PR! Could you please make sure the tests in the GitHub actions for this PR are all passing? Additionally, could you please add some documentation on how to use this feature in the docs of this repository? Thanks! |
…/using-tags.md` * **README.md** - Add a section to document the `hasTag` method - Include examples of how to use the `hasTag` method * **docs/basic-usage/using-tags.md** - Add a section to document the `hasTag` method - Include examples of how to use the `hasTag` method
Add "hasTag" method to check if the model has a certain tag
…ation Document the `hasTag` method
…t differentiate between tags not using type in any case.
# Conflicts: # src/HasTags.php
Hi @AlexVanderbist. Think this is all done now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using hard coded taggables
table name will break app with custom table name.
}) | ||
->join( | ||
$tagModel->getTable(), | ||
'taggables.tag_id', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break custom taggables table names
{ | ||
$this->query->select($this->related->getTable() . ".*") | ||
->join( | ||
"taggables as taggables_related", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing for all this file, this will break custom taggables table names
Hi,
This is my first PR, so please bear with me if I've got anything wrong!
I'm using this in my project where I wanted to have a relationship between models using shared tags. Essentially, I want to categorise products by tags, where ProductCategory models share tags with Product models.
I've added testing, which passes. Hopefully all is covered.
Thank you