Download the PHP package birdcar/laravel-label-graph without Composer
On this page you can find all versions of the php package birdcar/laravel-label-graph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download birdcar/laravel-label-graph
More information about birdcar/laravel-label-graph
Files in birdcar/laravel-label-graph
Package laravel-label-graph
Short Description A Laravel package for managing hierarchical labels as a DAG with materialized path routes
License MIT
Informations about the package laravel-label-graph
Laravel Label Graph
Laravel package for hierarchical labels with multiple parents (DAG), lquery pattern matching (priority.*, *.bug), and materialized path routes for fast queries. Unlike traditional trees, labels can belong to multiple hierarchies—a "Wireless Gaming Mouse" can appear in both "Electronics > Mice" AND "Gaming > Accessories".
Perfect For
- E-commerce categories: Products in multiple categories
- Issue tracker labels: GitHub-style hierarchical labels with pattern queries
- Content taxonomy: Nested topics with fast ancestor/descendant lookups
- Permission hierarchies: Complex permission structures with multiple inheritance
Not For
- Simple flat tags: Use spatie/laravel-tags instead
- Single-parent trees: Consider kalnoy/nestedset if you don't need multi-parent
Installation
Publish and run migrations:
Optionally publish the config:
Quick Start
Create Labels
Attach Labels to Models
Query Routes Directly
Documentation
Full documentation available at birdcar.github.io/laravel-label-graph
- When to Use - Decision guide for package selection
- Package Comparison - vs spatie/laravel-tags, kalnoy/nestedset
- Implementation Guide - Complete integration walkthrough
- Installation
- Models & Relationships
- HasLabels Trait
- Query Scopes & Patterns
- Query Cookbook - 20+ query examples
- Architecture
Requirements
- PHP 8.3+
- Laravel 11.0+ or 12.0+
- SQLite, MySQL 8.0+, or PostgreSQL 14+
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting a PR.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Run tests:
./vendor/bin/pest - Run linting:
./vendor/bin/pint && ./vendor/bin/phpstan analyse - Commit your changes with a descriptive message
- Push to your branch and create a Pull Request
License
The MIT License (MIT). See LICENSE for details.
All versions of laravel-label-graph with dependencies
illuminate/contracts Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0