eloquent-taggable icon indicating copy to clipboard operation
eloquent-taggable copied to clipboard

Model with popularTags not apply global scope

Open Kotzilla opened this issue 4 years ago • 2 comments

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.

Kotzilla avatar Jun 30 '21 11:06 Kotzilla

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

Content::withoutGlobalScopes()->popularTags(20);

cviebrock avatar Aug 25 '21 17:08 cviebrock

@cviebrock

yes i try but it's return

call to undefined method Illuminate\Database\Eloquent\Builder

Kotzilla avatar Aug 31 '21 04:08 Kotzilla