Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tag Bundle Laravel Package

coosos/tag-bundle

View on GitHub
Deep Wiki
Context7

Coosos/TagBundle

SensioLabsInsight

TagBundle is a bundle created from the Grafikart video.

Requirements

Installation

Step 1 : Download the bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle :

$ composer require coosos/tag-bundle

This command is used if composer is installed in your system.

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project :

// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Coosos\TagBundle\CoososTagBundle(),
        );
        // ...
    }
    // ...
}

Step 3: Insert tag entity in your database

Use this command to insert tag entity in your database

$ php bin/console doctrine:schema:update -f

Usage

Tags fields in entity

namespace AppBundle\Entity;

use Coosos\TagBundle\Model\Taggable\TaggableTrait;

class Actuality {

    use TaggableTrait;

}

Form type

To create a field for tags, you must use a field type provided by the bundle

use Coosos\TagBundle\Form\Type\TagsType;
...
$builder->add("tags", TagsType::class);

Options

Configuration list
Usage
$builder->add("tags", TagsType::class, [
    ...,
    "coosos_tag_auto_complete"  => false,
    "coosos_tag_persist_new"    => false,
    "coosos_tag_category"       => "House"
]);

Routing

You must include the route to the bundle controller

# app/config/routing.yml

tag:
    resource: "@CoososTagBundle/Controller/"
    type: annotation

Form theme

You must have jQuery tagEditor included in your project

twig:
    form_themes:
        - "CoososTagBundle:Form:fields.html.twig"
Auto complete

The auto completion uses the library jQuery UI Autocomplete

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware