You can add and use tags for your models for any time! This package is a simplified version of the spatie laravel tags package.

dev-main 2023-01-07 23:07 UTC

This package is auto-updated.

Last update: 2025-09-08 05:41:06 UTC


README


Yemrealtanay/tags

Laravel Composer Library
Explore the docs »

· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgments

About The Project

You can add and use tags for your models for any time! This package is a simplified version of the spatie laravel tags package. If you want to more detailed tag package please visit: https://spatie.be/docs/laravel-tags/v4/introduction

(back to top)

Built For

Laravel

(back to top)

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • need
    "php": "^8.0",
          "laravel/framework": "^8.67|^9.0"

Installation

    • composer
composer require Yemrealtanay/tags
  1. vendor publish for migrations
    php artisan vendor:publish --provider="Yemrealtanay\Tags\TagsServiceProvider" --tag="migrations"
  1. vendor publish for config file
    php artisan vendor:publish --provider="Yemrealtanay\Tags\TagsServiceProvider" --tag="config"
  1. migrate
    php artisan migrate

(back to top)

Usage

    use Yemrealtanay\Tags\HasTags
    
    
    User::attachTags(['tag1', 'tag2', 'tag3']);

    User::detachTags(['tag1', 'tag2']);
    
    User::with('tags')->query();

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Yunus Emre Altanay - y.emrealtanay@gmail.com

Project Link: https://github.com/yemrealtanay/tags/