PHPackages                             misaf/vendra-attribute - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. misaf/vendra-attribute

ActiveVendra-module[Utility &amp; Helpers](/categories/utility)

misaf/vendra-attribute
======================

Reusable tenant-aware attributes and polymorphic values for Vendra models

v1.10.0(3w ago)113↓80%3MITPHPPHP ^8.3

Since Jul 10Pushed 6d agoCompare

[ Source](https://github.com/misaf/vendra-attribute)[ Packagist](https://packagist.org/packages/misaf/vendra-attribute)[ Docs](https://github.com/misaf/vendra-attribute)[ RSS](/packages/misaf-vendra-attribute/feed)WikiDiscussions 1.x Synced 1w ago

READMEChangelog (10)Dependencies (43)Versions (23)Used By (3)

Vendra Attribute
================

[](#vendra-attribute)

Reusable, tenant-agnostic attributes and polymorphic values for Vendra applications.

Features
--------

[](#features)

- Reusable attribute definitions with optional units
- Polymorphic values that can belong to products or any other Eloquent model
- Automatic tenant scoping through `misaf/vendra-support` when a tenant resolver is available
- Global operation when tenancy is not installed or enabled
- Sortable attributes and values
- Soft deletes
- Filament resource on configured panels
- English, German, and Persian translations

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 13
- Filament 5
- `misaf/vendra-support`

Optional:

- `misaf/vendra-tagger` — enables assigning `attribute`-typed tags through the shared Support resolver

Installation
------------

[](#installation)

```
composer require misaf/vendra-attribute
php artisan vendor:publish --tag=vendra-attribute-migrations
php artisan migrate
```

Optional configuration and translations:

```
php artisan vendor:publish --tag=vendra-attribute-config
php artisan vendor:publish --tag=vendra-attribute-translations
```

The service provider and Filament plugin are auto-registered.

When `misaf/vendra-product` is also installed by the host application, its attribute fields are enabled automatically through the shared Vendra Support resolver. Neither package requires the other directly.

When `misaf/vendra-tagger` is installed, the Attribute form and table expose tags automatically. Create tags with the reserved `attribute` type:

```
use Misaf\VendraTagger\Models\Tagger;

Tagger::findOrCreate('Product specification', type: 'attribute', locale: 'en');
```

Attribute imports neither Vendra Tagger nor Spatie Tags.

Usage
-----

[](#usage)

Add attribute values to an Eloquent model with the provided concern:

```
use Illuminate\Database\Eloquent\Model;
use Misaf\VendraAttribute\Concerns\HasAttributeValues;

final class Product extends Model
{
    use HasAttributeValues;
}
```

Alternatively, a model may extend `Misaf\VendraAttribute\Models\AttributableModel`.

Create an attribute definition:

```
use Misaf\VendraAttribute\Models\Attribute;

$weight = Attribute::query()->create([
    'name' => 'Weight',
    'description' => 'Shipping weight',
    'unit' => 'kg',
    'active' => true,
]);
```

Assign a value to any attributable model:

```
$product->attributeValues()->create([
    'attribute_id' => $weight->id,
    'value' => '1.2',
]);
```

Load values with their definitions:

```
$product->load('attributeValues.attribute');

foreach ($product->attributeValues as $attributeValue) {
    $name = $attributeValue->attribute->name;
    $value = $attributeValue->value;
    $unit = $attributeValue->attribute->unit;
}
```

Tenant Awareness
----------------

[](#tenant-awareness)

The package never depends on a concrete tenant provider. Both `Attribute` and `AttributeValue` use the resolver-driven tenancy support from `misaf/vendra-support`.

- With the default null resolver, records are global and the migrations omit `tenant_id`.
- When a tenant provider binds an available resolver, migrations add `tenant_id`, and models are scoped and stamped automatically.

Do not assign `tenant_id` manually.

Filament
--------

[](#filament)

Attribute definitions are managed in the shared `Catalog` cluster. By default, the plugin is registered on the `admin` panel.

Configure panels, the navigation group, and available units in `config/vendra-attribute.php` after publishing the configuration.

Seeding Permissions
-------------------

[](#seeding-permissions)

```
php artisan vendra-attribute:seed
```

When tenancy is enabled, an optional tenant ID or slug may be supplied:

```
php artisan vendra-attribute:seed tenant-slug
```

Testing
-------

[](#testing)

Run the package checks from the package directory:

```
composer test
composer analyse
```

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance97

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

22

Last Release

27d ago

Major Versions

0.2.0 → v1.0.02026-07-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/41fd7351d25e29dafa18068d0418eecf6bb47a7473aabe6bc674b4ca35e71805?d=identicon)[misaf](/maintainers/misaf)

---

Top Contributors

[![misaf](https://avatars.githubusercontent.com/u/8195685?v=4)](https://github.com/misaf "misaf (56 commits)")

---

Tags

laravelfilamentphpmisafattributevendra

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/misaf-vendra-attribute/health.svg)

```
[![Health](https://phpackages.com/badges/misaf-vendra-attribute/health.svg)](https://phpackages.com/packages/misaf-vendra-attribute)
```

###  Alternatives

[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)[tapp/filament-form-builder

User facing form builder using Filament components

133.5k6](/packages/tapp-filament-form-builder)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
