Skip to content

Conversation

@gtmassey
Copy link
Contributor

Scoped queries in the HasTags trait previously hard-coded the tags.id value for the where or whereIn clauses. This PR addresses the issue by creating new methods to get the Tag class's table name and primary key name from the defined class name in the config file, or by defaulting to Tag::class.

Tests were not updated, because existing tests cover use cases.

@freekmurze freekmurze merged commit 73ef478 into spatie:main Jan 31, 2025
31 checks passed
@freekmurze
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants