Site-wide Tags Manager module for AsgardCMS.

Installs: 16

Dependents: 0

Suggesters: 0

Stars: 1

Watchers: 1

Forks: 0

Type:asgard-module

1.0.3 2015-11-18 19:44 UTC

README

Latest Version Software License

Quick Use Docs

Rough docs...

To Controller add:

use Modules\Tags\Support\Traits\TagRelation;
    /**
     * @var Tag
     */
    private $tag;

    public function __construct(
        ...
        TagRepository $tag
    ) {
        parent::__construct();

        ...
        $this->tag = $tag;
    }
    public function store(Request $request)
    {
        $[OBJECT] = $this->[OBJECT]->create($request->all());
        $this->tag->syncMultipleTagsByZoneForEntity($request->tags, 'tags', $[OBJECT]);
    public function update([OBJECT] $[OBJECT], Request $request)
    {
        $this->tag->syncMultipleTagsByZoneForEntity($request->tags, 'tags', $[OBJECT]);

To Entitie add:

use Modules\Tags\Support\Traits\TagRelation;
class [OBJECT] extends Model
{
    use TagRelation;

In Views:

	@include('tags::admin.fields.tags', ['zone' => 'tags'])

Resources