PHPackages                             zing/laravel-eloquent-tags - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. zing/laravel-eloquent-tags

ActiveLibrary[Database &amp; ORM](/categories/database)

zing/laravel-eloquent-tags
==========================

Manage tags for Laravel eloquent

3.5.0(1mo ago)3491MITPHPPHP ^8.0

Since Oct 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/zingimmick/laravel-eloquent-tags)[ Packagist](https://packagist.org/packages/zing/laravel-eloquent-tags)[ Docs](https://github.com/zingimmick/laravel-eloquent-tags)[ RSS](/packages/zing-laravel-eloquent-tags/feed)WikiDiscussions 3.x Synced 2d ago

READMEChangelog (3)Dependencies (10)Versions (33)Used By (0)

Laravel Eloquent Tags
=====================

[](#laravel-eloquent-tags)

[![Latest Stable Version](https://camo.githubusercontent.com/8968365691369c530650f9944a73b930300c487edacdb6af1c160eed9967c90c/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d746167732f762f737461626c652e737667)](https://packagist.org/packages/zing/laravel-eloquent-tags)[![Total Downloads](https://camo.githubusercontent.com/e5ff72651ddc8f4bdc3de50bcfe5e71117acdbc1d37a949b1a0555cd7586d081/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d746167732f646f776e6c6f616473)](https://packagist.org/packages/zing/laravel-eloquent-tags)[![Latest Unstable Version](https://camo.githubusercontent.com/48c8c8861032bc0eea98836a4e33bccd0ada182a3b2b57892916548862a6ad04/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d746167732f762f756e737461626c652e737667)](https://packagist.org/packages/zing/laravel-eloquent-tags)[![License](https://camo.githubusercontent.com/b087d5a917422c791231863edcd779a77370ff6d8e9eb9437900132af2be260f/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d746167732f6c6963656e7365)](https://packagist.org/packages/zing/laravel-eloquent-tags)

> **Requires [PHP 8.0+](https://php.net/releases/)**

Require Laravel Eloquent Tags using [Composer](https://getcomposer.org):

```
composer require zing/laravel-eloquent-tags
```

Usage
-----

[](#usage)

```
use Zing\LaravelEloquentTags\Tests\Models\Product;
use Zing\LaravelEloquentTags\Tag;

$product = Product::query()->first();
// Add tag(s) to model
$product->attachTag("tag");
$product->attachTags([
    "tag",
    Tag::query()->first()
]);
// Remove tag(s) from model
$product->detachTag("tag");
$product->detachTags([
    "tag",
    Tag::query()->first()
]);
// Reset tags of model
$product->syncTags([
    "tag",
    Tag::query()->first()
]);
// Get tags of model
$product->tags;
// Eager load tags
$products = Product::query()->with('tags')->withCount('tags')->get();
$products->each(function (Product $product){
    $product->tags->dump();
    $product->tags_count;
});
// Query by tag
Product::query()->withAnyTags(['tag', 'github'])->exists(); // true
Product::query()->withAllTags(['tag', 'github'])->exists(); // false
```

License
-------

[](#license)

Laravel Eloquent Tags is an open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 66.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Recently: every ~279 days

Total

32

Last Release

56d ago

Major Versions

0.1.1 → 1.1.02021-07-21

1.x-dev → 2.0.02022-08-26

2.x-dev → 3.0.02022-11-05

PHP version history (4 changes)0.0.1PHP ^7.2

0.1.0PHP ^7.2 || ^8.0

2.0.0PHP ^7.3 || ^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fafa5bffa28dcd722432b244bf3f0bfe773406df29fea295847e2397b95d50b?d=identicon)[zingimmick](/maintainers/zingimmick)

---

Top Contributors

[![zingimmick](https://avatars.githubusercontent.com/u/26657141?v=4)](https://github.com/zingimmick "zingimmick (80 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (28 commits)")[![kodiakhq[bot]](https://avatars.githubusercontent.com/in/29196?v=4)](https://github.com/kodiakhq[bot] "kodiakhq[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

eloquentlaraveltagslaraveleloquenttags

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zing-laravel-eloquent-tags/health.svg)

```
[![Health](https://phpackages.com/badges/zing-laravel-eloquent-tags/health.svg)](https://phpackages.com/packages/zing-laravel-eloquent-tags)
```

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[io238/laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.

5462.3k](/packages/io238-laravel-iso-countries)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
