lyre/facet
Larablocks Analysis
lyre/facet works with Laravel 11, 12 and 13 (latest release 1.5.0, Oct 21, 2026).
Recommendation checks
PromisingPromising: maintained and up to date, meets 2 of 4 checks; not yet widely used.
- Works with Laravel 13, the current version
- Released in the last 12 months (Oct 21, 2026)
- 478 downloads a month (needs 10,000)
- 0 GitHub stars (needs 100)
State
Actively maintained- Last stable release: Oct 21, 2026.
- 6 releases in the last 12 months.
- First released: May 5, 2025.
- Monthly downloads: 478.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require lyre/facet |
|
| Latest Version: | 1.5.0 |
| PHP: | ^8.3 |
| Laravel: | 11 · 12 · 13 |
| License: | MIT |
| Last Updated: | Oct 21, 2026 |
| Links: | GitHub · Packagist |
Lyre Facet
Lyre Facet is a lyre/lyre add-on for tagging and organizing records with reusable facets and facet values.
It provides three core models:
Facet: the taxonomy group, such asBlog Category,Task Categories, orSubscription Plan CategoryFacetValue: a concrete value inside a facet, such asFreeorMainFacetedEntity: the polymorphic pivot that links any facetable model to a facet value
How It Works
Tagging models
Any model can become facetable by using Lyre\Facet\Concerns\HasFacet.
That trait adds:
facetedEntities()morph-many relation to the pivot tablefacetValues()has-many-through relation to attached valuesattachFacetValues($ids)helper to replace all current facet assignments
This is how Aspire tags exams, assessments, tasks, subscription plans, and articles.
Hierarchies
Both Facet and FacetValue support optional parent/child hierarchy through parent_id.
The package exposes:
parent()children()ancestors()descendants()roots()scope
Repositories for Facet and FacetValue use HasHierarchy, which powers:
GET /api/facets/hierarchy/{facetId?}GET /api/facetvalues/hierarchy/{facetValueId?}
facetvalues/hierarchy also accepts a facet query parameter so clients can scope root values to a specific facet.
Resource behavior
FacetusesslugasID_COLUMNFacetValueusesslugasID_COLUMN- both expose lightweight computed fields such as
parent_nameandfacet_name - hierarchy endpoints return nested arrays with a
depthfield
Installation
composer require lyre/facet
Publish assets:
php artisan vendor:publish --provider="Lyre\Facet\Providers\LyreFacetServiceProvider"
If you use Filament, register the plugin:
use Lyre\Facet\Filament\Plugins\LyreFacetFilamentPlugin;
$panel->plugins([
new LyreFacetFilamentPlugin(),
]);
Example Usage
Add the trait to a model:
use Lyre\Facet\Concerns\HasFacet;
class Article extends Model
{
use HasFacet;
}
Attach facet values:
$article->attachFacetValues([$newsId, $featuredId]);
Query tagged models through normal Lyre relation filters:
GET /api/articles?relation=facetValues,featured
Or scope dynamic section data in lyre/content using the facet filter, which resolves all values under a named facet and constrains the target model to those values.
Aspire Usage Notes
In Aspire, the package is used for:
- blog article categories
- exam categories
- task categories, including the
Freetask flow - subscription plan categories, including the
Mainplan flow
Good examples to inspect:
app/Models/Assessment.phpapp/Models/Exam.phpdatabase/seeders/FacetSeeder.phpdatabase/seeders/TaskSeeder.phpapp/Filament/Resources/AssessmentResource.phpapp/Filament/Resources/ExamResource.php
Limits To Keep In Mind
attachFacetValues()is a replace-all helper, not an additive sync helper- facet-based filtering depends on models exposing the
facetValuesrelation - hierarchy support is implemented only where the repository explicitly uses
HasHierarchy
Alternatives to lyre/facet
A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PH...
Lookup for visitor's IP information, such as country, region, city, coordinates,...
Get the geographical location of website visitors based on their IP addresses. S...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.5.0 | ^8.3 | MIT | |
| 1.4.3 | ^8.3 | MIT | |
| 1.4.2 | ^8.3 | MIT | |
| 1.4.1 | ^8.3 | MIT | |
| 1.4.0 | ^8.2 | MIT | |
| 1.3.2 | ^8.2 | MIT | |
| 1.3.1 | ^8.2 | MIT | |
| 1.3.0 | ^8.2 | MIT | |
| 1.2.1 | ^8.2 | MIT | |
| 1.2.0 | ^8.2 | MIT | |
| 1.1.0 | ^8.2 | MIT | |
| 1.0.11 | ^8.2 | MIT | |
| 1.0.10 | ^8.2 | MIT | |
| 1.0.9 | ^8.2 | MIT | |
| 1.0.8 | ^8.2 | MIT | |
| 1.0.7 | ^8.2 | MIT | |
| 1.0.6 | ^8.2 | MIT | |
| 1.0.5 | ^8.2 | MIT | |
| 1.0.4 | ^8.2 | MIT | |
| 1.0.3 | ^8.2 | MIT | |
| 1.0.2 | ^8.2 | MIT | |
| 1.0.1 | ^8.2 | MIT | |
| 1.0.0 | ^8.2 | MIT |