Skip to content

Add withAnyTagsOfType scope #535

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

Merged
merged 2 commits into from
Mar 8, 2025
Merged

Add withAnyTagsOfType scope #535

merged 2 commits into from
Mar 8, 2025

Conversation

voicecode-bv
Copy link
Contributor

This update allows you to filter models that have any tags of a certain type.

For example, if you want to filter out users who are interested in planets as a type, but don't care whether it's specifically the Moon, Mars, Venus, or E.T., you can use this filter.

User::withAnyTagsOfType('comedy');

User::withAnyTagsOfType(['comedy', 'space']);

This update allows you to filter models that have any tags of a certain type.
@freekmurze
Copy link
Member

Nice, could you also document this?

@voicecode-bv
Copy link
Contributor Author

Hi @freekmurze sure thing, there you go!

@freekmurze freekmurze merged commit 2ecdb30 into spatie:main Mar 8, 2025
73 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