<commit_before>Laravel Tag Plugin
============

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 Install

    "require": {
        "rtconner/laravel-tagging": "dev-master"
    }

#### Run the migrations

	php artisan migrate --package=rtconner/laravel-tagging
	
#### Setup your models

    class Article extends \Eloquent {
        use Conner\Tagging\Taggable;
    }

#### Sample Usage

    $article->tag('Gardening'); // attach the tag
    
    $article->untag('Cooking'); // remove Cooking tag
    
    $article->tagged(); // return Collection of rows tagged to article
    
    $article->tagNames(); // get array of related tag names	
    
    Article::withTag('Gardening')->get(); // fetch all articles with tag
    
    Conner\Tagging\Tag::where('count', '>', 2)->get(); // return all tags used more than twice<commit_msg>Update README for withTags method.<commit_after>Laravel Tag Plugin
============

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 Install

    "require": {
        "rtconner/laravel-tagging": "dev-master"
    }

#### Run the migrations

	php artisan migrate --package=rtconner/laravel-tagging
	
#### Setup your models

    class Article extends \Eloquent {
        use Conner\Tagging\Taggable;
    }

#### Sample Usage

    $article->tag('Gardening'); // attach the tag
    
    $article->untag('Cooking'); // remove Cooking tag
    
    $article->tagged(); // return Collection of rows tagged to article
    
    $article->tagNames(); // get array of related tag names	
    
    Article::withTag('Gardening')->get(); // fetch all articles with tag
    
    Article::withTags('Gardening, Cooking')->get() // fetch all articles with given tags
    
    Article::withTags(['Gardening','Cooking'])->get() // fetch all articles with given tags
    
    Conner\Tagging\Tag::where('count', '>', 2)->get(); // return all tags used more than twice
{'fraction_non_alphanumeric': 0.12244094488188977, 'fraction_numerical': 0.0007874015748031496, 'mean_word_length': 3.2705882352941176, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '272937', 'n_tokens_mistral': 721, 'n_tokens_neox': 691, 'n_words': 276}