November 11, 2025

Laravel Taxonomy: Flexible Hierarchies, Categories & Tags for Your Laravel App

package
Laravel Taxonomy: Flexible Hierarchies, Categories & Tags for Your Laravel App

Laravel Taxonomy brings powerful taxonomy management to your Laravel application.

whether you’re building an e-commerce store, a content platform, or a tagging system.

It lets you manage categories, tags, and hierarchical data with nested-set support for fast and efficient queries — all with a clean, expressive API.

composer require aliziodev/laravel-taxonomy php artisan taxonomy:install php artisan migrate

Define and Structure Your Taxonomies

Create categories, subcategories, and tags easily:

use Aliziodev\LaravelTaxonomy\Facades\Taxonomy; use Aliziodev\LaravelTaxonomy\Enums\TaxonomyType; $electronics = Taxonomy::create([ 'name' => 'Electronics', 'type' => TaxonomyType::Category->value, ]); $smartphones = Taxonomy::create([ 'name' => 'Smartphones', 'type' => TaxonomyType::Category->value, 'parent_id' => $electronics->id, ]);

Key Highlights

  • Nested Hierarchies: Parent-child structures with optimized queries
  • Metadata Support: Add custom JSON data to each term
  • Caching & Performance: Built-in caching for large datasets
  • Bulk Operations: Attach, detach, sync, or toggle terms in bulk
  • Composite Slugs: Slugs unique within their type for flexibility
  • Custom Types: Define your own taxonomy types beyond category or tag

From blog tags to e-commerce filters, Laravel Taxonomy makes managing structured and hierarchical data simple and elegant.


🧩 Get Started

Read more or explore the package here: https://laravel-hub.com/package/laravel-taxonomy

Did you find this article helpful? Share it!