Closed Katerou22 closed 7 years ago
This is supported in the 3.0.1 release:
For one model's tags:
// Return the top 10 most popular tags, as long as each tag has been used at least 3 times
$tags = $model->popularTags(10, 3);
If you share tags across models, it's a bit more code:
// Return the top 10 most popular tags, across all models, with a count of at least 3
$tagService = app(\Cviebrock\EloquentTaggable\Services\TagService::class);
$tagService->getPopularTags($limit, null, $minimumCount);
Is it possible to get tags which used twice or three times? something like this:
Tags::where('count', '>', '3')->get();