laravel-tagging maintained by rtconner
Last update
2026/02/22 03:07
License
Require
- illuminate/database ^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/support ^9.0|^10.0|^11.0|^12.0|^13.0
- php ^8.2
Last update
2026/02/22 03:07
License
Require
- php ^8.2
- illuminate/database ^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/support ^9.0|^10.0|^11.0|^12.0|^13.0
Last update
2025/04/02 01:43
License
Require
- php ^7.3|^8.0
- illuminate/database ^8.67|^9.0|^10.0|^11.0|^12.0
- illuminate/support ^8.67|^9.0|^10.0|^11.0|^12.0
Last update
2024/12/21 20:39
License
Require
- php ^7.3|^8.0
- illuminate/database ^8.67|^9.0|^10.0|^11.0
- illuminate/support ^8.67|^9.0|^10.0|^11.0
Last update
2022/04/26 00:18
License
Require
- illuminate/database >=8.0
- illuminate/support >=8.0
- php ^7.3|^8.0
Last update
2022/04/26 00:18
License
Require
- php ^7.3|^8.0
- illuminate/database >=8.0
- illuminate/support >=8.0
Last update
2022/03/28 06:45
License
Require
- php ^7.3|^8.0
- illuminate/database >=8.0
- illuminate/support >=8.0
Last update
2022/02/22 20:41
License
Require
- php ^7.3|^8.0
- illuminate/database >=8.0
- illuminate/support >=8.0
Last update
2021/04/23 22:12
License
Require
- php ^7.3|^8.0
- illuminate/database >=8.0
- illuminate/support >=8.0
Last update
2020/10/17 21:18
License
Require
- php ^7.3
- illuminate/database >=8.0
- illuminate/support >=8.0
Last update
2020/04/28 05:43
License
Require
- illuminate/database >= 5.0|^6.0|^7.0
- illuminate/support >= 5.0|^6.0|^7.0
- php >=7.0
Last update
2020/04/28 05:43
License
Require
- php >=7.0
- illuminate/database >= 5.0|^6.0|^7.0
- illuminate/support >= 5.0|^6.0|^7.0
Last update
2020/03/15 06:32
License
Require
- php >=7.0
- illuminate/database >= 5.0|^6.0|^7.0
- illuminate/support >= 5.0|^6.0|^7.0
Last update
2020/03/02 23:08
License
Require
- php >=7.0
- illuminate/database >= 5.0|^6.0|^7.0
- illuminate/support >= 5.0|^6.0|^7.0
Last update
2019/08/12 02:27
License
Require
- php >= 7.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2019/08/12 02:27
License
Require
- php >= 7.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2019/07/06 15:39
License
Require
- php >= 7.0
- illuminate/database ^5.0
- illuminate/support ^5.0
Last update
2019/07/03 05:20
License
Require
- php >= 7.0
- illuminate/database ^5.0
- illuminate/support ^5.0
Last update
2019/07/03 04:16
License
Require
- php >= 7.0
- illuminate/database ^5.0
- illuminate/support ^5.0
Last update
2019/03/21 02:31
License
Require
- php >= 7.0
- illuminate/database ^5.0
- illuminate/support ^5.0
Last update
2019/03/20 04:27
License
Require
- php >= 7.0
- illuminate/database ^5.0
- illuminate/support ^5.0
Last update
2018/08/13 18:25
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2017/09/06 05:49
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2017/04/28 18:27
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2016/09/12 23:50
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2016/08/22 18:23
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2016/04/07 07:36
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2016/02/15 18:54
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2016/02/07 19:12
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2016/01/06 05:00
License
Require
- php >=5.5.0
- illuminate/database >= 5.0
- illuminate/support >= 5.0
Last update
2015/11/28 23:33
License
Require
- php >=5.5.0
- illuminate/database ~5.1
- illuminate/support ~5.1
Last update
2015/10/24 00:36
License
Require
- php >=5.5.0
- illuminate/database ~5.1
- illuminate/support ~5.1
Last update
2015/10/19 03:00
License
Require
- php >=5.5.0
- illuminate/database ~5.1
- illuminate/support ~5.1
Last update
2015/09/12 18:17
License
Require
- php >=5.5.0
- illuminate/database ~5.1
- illuminate/support ~5.1
Last update
2015/09/11 15:16
License
Require
- php >=5.5.0
- illuminate/database ~5.1
- illuminate/support ~5.1
Last update
2015/09/06 04:05
License
Require
- php >=5.5.0
- illuminate/database ~5.1
- illuminate/support ~5.1
Last update
2015/08/09 02:53
License
Require
- php >=5.3.0
- illuminate/database ~5.0
- illuminate/support ~5.0
Last update
2015/07/19 19:43
License
Require
- php >=5.3.0
- illuminate/database ~5.0
- illuminate/support ~5.0
Last update
2015/07/17 16:34
License
Require
- php >=5.3.0
- illuminate/database ~5.0
- illuminate/support ~5.0
Last update
2015/07/12 01:54
License
Require
- php >=5.3.0
- illuminate/database ~5.0
- illuminate/support ~5.0
Last update
2015/05/30 00:55
License
Require
- php >=5.3.0
- illuminate/database ~5.0
- illuminate/support ~5.0
Last update
2014/09/29 21:35
License
Require
- php >=5.3.0
- illuminate/database 4.*
- illuminate/config 4.*
Last update
2014/08/22 19:50
License
Require
- php >=5.3.0
- illuminate/database 4.*
- illuminate/config 4.*
Laravel Taggable Trait
This package is not meant to handle javascript or html in any way. This package handles database storage and read/writes only.
There are no real limits on what characters can be used in a tag. It uses a slug transform to determine if two tags are identical ("sugar-free" and "Sugar Free" would be treated as the same tag). Tag display names are run through Str::title()
composer require rtconner/laravel-tagging
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
class Article extends \Illuminate\Database\Eloquent\Model
{
use \Conner\Tagging\Taggable;
}
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
Configure
See config/tagging.php for configuration options.
Developer
- Robert Conner - http://dealerzone.com
- BlueSky - https://bsky.app/profile/robertconner.com