Download the PHP package waavi/tagging without Composer
On this page you can find all versions of the php package waavi/tagging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waavi/tagging
More information about waavi/tagging
Files in waavi/tagging
Informations about the package tagging
Tagging - Tags for Laravel 5 Eloquent models.
Introduction
This package allows you to easily add tags to Eloquents models. Inspired by the handy cviebrock/eloquent-taggable package.
WAAVI is a web development studio based in Madrid, Spain. You can learn more about us at waavi.com
Laravel compatibility
Laravel | tagging |
---|---|
5.1.x | 1.0.x |
5.2.x | 1.0.7 and higher |
5.3.x | 2.0 and higher |
Installation
Require through composer
Or manually edit your composer.json file:
Add the following entry to the end of the providers array in app/config.php:
If you do not use Eloquent-Sluggable or Waavi\Translation you will also need to add:
Publish the configuration file and run the migrations:
Now you can edit config/tagging.php with your settings.
Updating from version 1.x
Version 2.x is not backwards compatible with 1.x. You will need to fully remove v1, delete the migrations, and then re-install from scratch.
Configuration
You may find the configuration file at config/tagging
Usage
Your models should implement Taggable's interface and use its trait:
Add tags to an existing model without removing existing ones:
Replace existing tags by the given ones in an existing model:
Remove tags from an existing model:
Remove all tags from an existing model:
Get tags:
Get by tag:
All versions of tagging with dependencies
illuminate/config Version ~5.3
illuminate/database Version ~5.3
waavi/translation Version ~2.1
cviebrock/eloquent-sluggable Version ~4.0