Download the PHP package humweb/taggables without Composer
On this page you can find all versions of the php package humweb/taggables. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download humweb/taggables
More information about humweb/taggables
Files in humweb/taggables
Package taggables
Short Description A powerful and flexible tagging package for Laravel with polymorphic relationships and user-scoped tags support
License MIT
Homepage https://github.com/humweb/taggables
Informations about the package taggables
Taggables Package for Laravel
A powerful and flexible tagging package for Laravel applications with polymorphic relationships support and user-scoped tags.
Features
- 🏷️ Polymorphic tagging - Tag any Eloquent model
- 👤 User-scoped tags - Personal tags for each user alongside global tags
- 📁 Tag types - Organize tags into categories
- 🔍 Advanced queries - Filter models by tags with ease
- 🚀 Performance optimized - Eager loading and query optimization
- 📊 Tag statistics - Popular tags, tag clouds, and more
- 🎯 Type hinting - Full IDE support with proper return types
- ✨ Laravel conventions - Follows Laravel best practices
Installation
You can install the package via composer:
Publish the migrations:
Run the migrations:
Optionally, publish the config file:
Usage
Making a Model Taggable
Add the HasTags trait to any model you want to make taggable:
Basic Tagging Operations
User-Scoped Tags
The package supports both global tags (available to all users) and user-specific tags:
Checking Tags
Querying by Tags
Using Tag Types
Tag types allow you to categorize your tags:
Working with the Tag Model
Tag Suggestions
Events
The package fires events during tagging operations:
TagAttached- Fired when a tag is attached to a modelTagDetached- Fired when a tag is detached from a modelTagsSynced- Fired when tags are synced
Artisan Commands
Clean up unused tags:
Advanced Usage
Custom Tag Model
You can extend the Tag model for additional functionality:
Update the config to use your custom model:
Eager Loading
Caching
The package supports caching for better performance:
Configuration
The full configuration file:
Migration Notes
The tags table includes a user_id column for user-scoped tags:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Ryan Shofner
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of taggables with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0