webx-ui / module-catalog-labels
Labels for the WebX UI catalogue: top, sale, new — several per product, a badge on the card, a filter with a multiple choice and products()->label('sale') in a template.
Requires
- php: ^8.4
- illuminate/contracts: ^13.0
- illuminate/database: ^13.0
- illuminate/routing: ^13.0
- illuminate/support: ^13.0
- illuminate/validation: ^13.0
- illuminate/view: ^13.0
- webx-ui/localization: ^0.86.0
- webx-ui/mcp: ^0.86.0
- webx-ui/module-admin: ^0.86.0
- webx-ui/module-catalog: ^0.86.0
Requires (Dev)
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.0 || ^13.0
- webx-ui/themes: ^0.86.0
Suggests
- webx-ui/themes: With a theme, a badge in a colour of its own gets its base look on site tokens (resources/theme/catalog-labels.css).
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.86.0
- v0.85.0
- v0.84.0
- v0.83.0
- v0.82.0
- v0.81.0
- v0.80.0
- v0.79.1
- v0.79.0
- v0.78.0
- v0.77.0
- v0.76.0
- v0.75.0
- v0.74.0
- v0.73.0
- v0.72.0
- v0.71.0
- v0.70.0
- v0.69.0
- v0.68.0
- v0.67.0
- v0.66.0
- v0.65.0
- v0.64.0
- v0.63.0
- v0.62.1
- v0.62.0
- v0.61.1
- v0.61.0
- v0.60.0
- v0.59.0
- v0.58.0
- v0.57.0
- v0.56.0
- v0.55.0
- v0.54.0
- v0.53.1
- v0.53.0
This package is auto-updated.
Last update: 2026-10-23 15:16:04 UTC
README
Labels for the catalogue of the WebX UI admin panel — top,
sale, new. Several on a product, a badge on the card, a filter with a multiple choice, and
products()->label('sale') in a template. A satellite of webx-ui/module-catalog: almost all of it
is registrations in the core's registries.
Requirements
- PHP 8.4+, Laravel 13
webx-ui/module-catalogand what it requires
Install
composer require webx-ui/module-catalog-labels php artisan migrate
The panel shows Labels in the «Catalog» group, under the «Dictionaries» caption. There are no
permissions of its own: catalog.view reads the list, catalog.manage writes it and puts labels
on products.
A label
| Field | What it is |
|---|---|
title |
The name, per language. |
code |
[a-z0-9-], one for every language: label_sale in a filter address. |
color |
A tone — neutral, primary, success, warning, danger, info. |
is_badge |
Drawn as a badge on the card. |
is_visible |
A choice of the filter. Off together with is_badge, the label is a service one. |
A label that is still on products cannot be deleted: take it off first, with the bulk action Remove a label. An edit that changes what the products show marks them for the search engine in one statement.
What it adds to the catalogue
- the field
labels.idsof the product form, in the «Main» tab; - a column of the list of products, the facet
label(not indexable), the fieldlabelsof the search document; - the bulk actions
add-labelandremove-label; - the badges in
catalog.card.badges— the viewwebx-catalog-labels::badges, published with--tag=webx-catalog-labels-views; the tone is a class (wx-catalog-badge--danger), the site decides the colour; products()->label('sale', 'new')— the products with any of these labels, by code.
To an agent: catalog_labels_list, _create, _update, _delete, _reorder; a product's labels
are written by catalog_products_update with labels.ids.
License
MIT