misaf / vendra-attribute-api
API services for the vendra-attribute module
Package info
github.com/misaf/vendra-attribute-api
Type:vendra-module
pkg:composer/misaf/vendra-attribute-api
Requires
- php: ^8.4
- illuminate/support: ^13.0
- misaf/vendra-api: v1.12.3
- misaf/vendra-attribute: v1.12.3
- spatie/laravel-package-tools: ^1.93.1
README
Read-only API Platform resources for the misaf/vendra-attribute domain module.
Features
- Dedicated resources for active catalog attributes and options
- Polymorphic attribute values exposed through a consistent API
- Tenant-agnostic — works with or without a tenant provider
- Optional attribute-value relationships on product and product-category endpoints
Requirements
- PHP 8.4+
- Laravel 13
misaf/vendra-attributemisaf/vendra-api
Installation
composer require misaf/vendra-attribute-api
The service provider registers the resources and provider automatically.
Resources
attributes — read-only
Fields: id, name, description, unit, position, active,
created_at, and updated_at. Only active attributes are returned.
Filters: id, exclude (by ID).
attribute-values — read-only
Fields: id, attribute_id, value, and read-only position. Values whose
attribute is inactive are not returned.
Filters: id, exclude (by ID).
Cross-module Integration
When both API modules are installed, misaf/vendra-product-api obtains the
catalog-option resource class through the provider-neutral Support contract.
Product resources expose stable references without importing this package.
API Routes
GET /api/catalog/attributesGET /api/catalog/attributes/{id}GET /api/catalog/attribute-valuesGET /api/catalog/attribute-values/{id}
Tenant Awareness
Tenancy is inherited from misaf/vendra-attribute domain models, which derive tenant behavior from misaf/vendra-support. The API module stays tenant-agnostic and never references a concrete tenant provider.
Testing
Run the package checks from the project root:
php artisan test --compact --testsuite=vendra-attribute-api
composer stan
License
MIT. See LICENSE.