PHPackages                             digu087/tcd-tagging - 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. digu087/tcd-tagging

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

digu087/tcd-tagging
===================

Use PHP traits to extend Laravel Eloquent Models to allow Tags. Models can be marked as Taggable. You can also assocaite a tag with multiple groups

V1.0(6y ago)0549MITPHPPHP &gt;=7.0

Since May 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/digu087/tcd-tagging)[ Packagist](https://packagist.org/packages/digu087/tcd-tagging)[ RSS](/packages/digu087-tcd-tagging/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Laravel Taggable Trait
======================

[](#laravel-taggable-trait)

[![Latest Stable Version](https://camo.githubusercontent.com/91422cf3b415d4c4d04bcc679628f1d9d232775012a6ee38bd838f404dbd494e/68747470733a2f2f706f7365722e707567782e6f72672f646967753038372f7463642d74616767696e672f762f737461626c652e737667)](https://packagist.org/packages/rtconner/laravel-tagging)[![Total Downloads](https://camo.githubusercontent.com/4ca67ec589bad96cc9e244ee555508a7883d476df2bc71868ce6b2fdfa6ec17a/68747470733a2f2f706f7365722e707567782e6f72672f646967753038372f7463642d74616767696e672f646f776e6c6f6164732e737667)](https://packagist.org/packages/rtconner/laravel-tagging)[![License](https://camo.githubusercontent.com/9cb9fb0e760f504617f65d507da68264b283eaad70848711bda8c71b166f0178/68747470733a2f2f706f7365722e707567782e6f72672f646967753038372f7463642d74616767696e672f6c6963656e73652e737667)](https://packagist.org/packages/rtconner/laravel-tagging)

This package is a fork of rtconner/laravel-tagging . This is a custom version of the original package. It adds ability for tags to be associated with multiple groups

#### Composer Install (for Laravel 5/6/7 and Lumen 5/6/7)

[](#composer-install-for-laravel-567-and-lumen-567)

```
composer require digu087/tcd-tagging "~4.0"
```

#### Install and then Run the migrations

[](#install-and-then-run-the-migrations)

The package should auto-discover when you composer update. Then publish the tagging.php and run the database migrations with these commands.

```
php artisan vendor:publish --provider="Conner\Tagging\Providers\TaggingServiceProvider"
php artisan migrate
```

#### Setup your models

[](#setup-your-models)

```
class Article extends \Illuminate\Database\Eloquent\Model
{
	use \Conner\Tagging\Taggable;
}
```

#### Quick Sample Usage

[](#quick-sample-usage)

```
$article = Article::with('tagged')->first(); // eager load

foreach($article->tags as $tag) {
	echo $tag->name . ' with url slug of ' . $tag->slug;
}

$article->tag('Gardening'); // attach the tag

$article->untag('Cooking'); // remove Cooking tag
$article->untag(); // remove all tags

$article->retag(array('Fruit', 'Fish')); // delete current tags and save new tags

$article->tagNames(); // get array of related tag names

Article::withAnyTag(['Gardening','Cooking'])->get(); // fetch articles with any tag listed

Article::withAllTags(['Gardening', 'Cooking'])->get(); // only fetch articles with all the tags

Article::withoutTags(['Gardening', 'Cooking'])->get(); // only fetch articles without all tags listed

Conner\Tagging\Model\Tag::where('count', '>', 2)->get(); // return all tags used more than twice

Article::existingTags(); // return collection of all existing tags on any articles
```

[Documentation: More Usage Examples](docs/usage-examples.md)

[Documentation: Tag Groups](docs/tag-groups.md)

[Documentation: Tagging Events](docs/events.md)

[Documentation: Tag Suggesting](docs/suggesting.md)

### Configure

[](#configure)

[See config/tagging.php](config/tagging.php) for configuration options.

###### Lumen Installation

[](#lumen-installation)

[Documentation: Lumen](docs/lumen.md)

#### Upgrading Laravel 4 to 5

[](#upgrading-laravel-4-to-5)

This library stores full model class names into the database. When you upgrade laravel and you add namespaces to your models, you will need to update the records stored in the database. Alternatively you can override Model::$morphClass on your model class to match the string stored in the database.

#### Credits

[](#credits)

- Robert Conner -

#### Further Reading

[](#further-reading)

- [Laravel News article on tagging with this library](https://laravel-news.com/how-to-add-tagging-to-your-laravel-app)
- [3rd Party Posting on installation with Twitter Bootstrap 2.3](http://blog.stickyrice.net/archives/2015/laravel-tagging-bootstrap-tags-input-rtconner)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2195d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee05e3dfa11985e741bc1d8944e3fc3230ea3665d2ec8fa6d45eb9a439cf4bc?d=identicon)[DigvijaySinghChauhan](/maintainers/DigvijaySinghChauhan)

---

Top Contributors

[![digu087](https://avatars.githubusercontent.com/u/2011369?v=4)](https://github.com/digu087 "digu087 (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digu087-tcd-tagging/health.svg)

```
[![Health](https://phpackages.com/badges/digu087-tcd-tagging/health.svg)](https://phpackages.com/packages/digu087-tcd-tagging)
```

###  Alternatives

[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)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)

PHPackages © 2026

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