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.3
- illuminate/support: ^13.0
- misaf/vendra-api: v1.10.0
- misaf/vendra-attribute: v1.10.0
- spatie/laravel-package-tools: ^1.93.1
Requires (Dev)
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.10.0
- laravel/boost: ^2.4.12
- laravel/pint: ^1.29.3
- misaf/vendra-product: v1.10.0
- misaf/vendra-testing: v1.10.0
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.9.4
- orchestra/testbench: ^11.1
- pestphp/pest: ^5.0
- pestphp/pest-plugin-arch: ^5.0
- pestphp/pest-plugin-laravel: ^5.0
- pestphp/pest-plugin-profanity: ^5.0
- pestphp/pest-plugin-type-coverage: ^5.0
- phpstan/extension-installer: ^1.4.3
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.3+
- 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 package directory:
composer test
composer analyse
License
MIT. See LICENSE.