Skip to content
This repository has been archived by the owner on Feb 16, 2018. It is now read-only.

danrichards/laravel-user-tagging

Repository files navigation

Laravel User Tagging

Latest Stable Version Total Downloads License Build Status

This library provides a scalable method for tracking tags that are attached to a eloquent Model by your app's users. This allows for indexing content based on how your app's users have tagged the content.

If you're looking for something more basic without user tracking or caching, please see the fantastic laravel-tagging by rtconner. Rob's library served as the base for building this project.

A laravel-repository package by Torann is used in this project for its repositories and caching. Please see his project for additional documentation on the repositories provided within.

Getting Starting

To use this library, you will need at least one repository using Torann's pattern. This repository will encapsulate whatever Model your app needs to tag. I would recommend setting up and testing this repository before continuing.

All the repositories included are complete with integration tests. The tests also serve as documentation!

Composer Install

composer require dan/laravel-user-tagging "dev-master"

Install and then Run the migrations

'providers' => array(
	'Dan\Tagging\Providers\TaggingServiceProvider',
);
php artisan vendor:publish --provider="Dan\Tagging\Providers\TaggingServiceProvider"
php artisan migrate

After these two steps are done, you can edit config/tagging.php with your preferred settings. You must provide at least one taggable interface in the config.

// Taggable Interfaces for Abstract Taggable Repositories
'taggable_interfaces' => [
    '\App\Models\Post' => '\App\Repositories\Posts\PostsInterface'
],

Quick Sample Usage

More examples in the documentation

Configure

See config/tagging.php for configuration options.

Credits

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.danrichards
MIT
LICENSE.rtconner

Stars

Watchers

Forks

Packages

No packages published

Languages