cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
537 stars 72 forks source link

Model with popularTags not apply global scope #126

Closed Kotzilla closed 7 months ago

Kotzilla commented 3 years ago

I use a model with taggable. Content::popularTags() but Content have a global scope with where('status', 'published');

it's return without filter condition is it the way to filter the popularTags ? i'have try with Content::where('status', 'published')->popularTags(20);

Thank you.

cviebrock commented 3 years ago

Can't you just disable global scopes the normal way?

Content::withoutGlobalScopes()->popularTags(20);
Kotzilla commented 3 years ago

@cviebrock

yes i try but it's return

call to undefined method Illuminate\Database\Eloquent\Builder

cviebrock commented 7 months ago

Closing old issue