2017 © Pedro PelĂĄez
 

library taxonomy

Taxonomy for your content

image

rocket/taxonomy

Taxonomy for your content

  • Saturday, January 2, 2016
  • by onigoetz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Taxonomy Component

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

This is a subtree split of RocketPropelledTortoise CMS - Core. Don't send pull requests here, (*2)

What is it ?

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)

Example

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')

Installing

Install with composer : composer require rocket/taxonomy, (*7)

Service Provider

You need to add both the Taxonomy and Translation Service Providers, (*8)

'\Rocket\Translation\Support\Laravel5\ServiceProvider',
'\Rocket\Taxonomy\Support\Laravel5\ServiceProvider'

Aliases

'I18N' => '\Rocket\Translation\Support\Laravel5\Facade',
'Taxonomy' => '\Rocket\Taxonomy\Support\Laravel5\Facade',

Migrations

php artisan migrate --path Translation/migrations
php artisan migrate --path Taxonomy/migrations

The Versions

02/01 2016

dev-master

9999999-dev

Taxonomy for your content

  Sources   Download

MIT

The Requires

 

02/08 2015

dev-entities

dev-entities

Taxonomy for your content

  Sources   Download

The Requires