dev-master
9999999-devTaxonomy for your content
MIT
The Requires
- php >=5.5.0
- illuminate/support ~5.2
- centraldesktop/graph ~1.0
dev-entities
dev-entitiesTaxonomy for your content
The Requires
Wallogit.com
2017 © Pedro PelĂĄez
Taxonomy for your content
This is a subtree split of RocketPropelledTortoise CMS - Core. Don't send pull requests here, (*2)
Taxonomy is the art of classifying things. The Taxonomy Component is here to help you classify your content., (*3)
Create as many vocabularies and terms that you want and assign them to content., (*4)
Vocabularies can be Regions, Countries, Tags, Categories.
A vocabulary contains terms, each term can have one or more sub-terms., (*5)
Taxonomy is a Laravel 5 module, (*6)
use Taxonomy;
use Model;
use Rocket\Taxonomy\TaxonomyTrait;
use Rocket\Translation\Model\Language;
use Schema;
class Post extends Model {
// add the taxonomy trait
use TaxonomyTrait;
public $fillable = ['content'];
}
Vocabulary::insert(['name' => 'Tag', 'machine_name' => 'tag', 'hierarchy' => 0, 'translatable' => true]);
// create the post
$post = new Post(['content' => 'a test post']);
$post->save();
// add the tags to it
$ids = T::getTermIds(['tag' => ['TDD', 'PHP', 'Add some tags']]);
$post->setTerms($ids);
// get the tags from the Post
$terms = $post->getTerms('tag')
Install with composer : composer require rocket/taxonomy, (*7)
You need to add both the Taxonomy and Translation Service Providers, (*8)
'\Rocket\Translation\Support\Laravel5\ServiceProvider', '\Rocket\Taxonomy\Support\Laravel5\ServiceProvider'
'I18N' => '\Rocket\Translation\Support\Laravel5\Facade', 'Taxonomy' => '\Rocket\Taxonomy\Support\Laravel5\Facade',
php artisan migrate --path Translation/migrations php artisan migrate --path Taxonomy/migrations
Taxonomy for your content
MIT
Taxonomy for your content