Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

EAV

LicenseStablePHPIssuesMerge Requests

Description

EAV adds entity-attribute-value support to Enso.

The package manages ordered attribute groups, ordered attributes inside groups, enumerated attribute values, and the services needed to build grouped EAV payloads for consumers. It is designed for domains where the attribute surface must remain configurable without introducing schema changes for every new field.

This is the backend/API package. It handles persistence, ordering, and validation of configurable attributes and their values.

Installation

This is a proprietary package distributed through the private Enso registry.

Run the package migrations:

php artisan migrate

Optional publishes:

php artisan vendor:publish --tag=eav-factory
php artisan vendor:publish --tag=eav-seeder

Features

  • Hierarchical attribute groups with ordering support.
  • Ordered attributes inside groups, including move operations across groups.
  • Attribute value lists for collection-like attributes.
  • CRUD and move endpoints for groups, attributes, and values.
  • Eav service for producing grouped attribute payloads, with optional filtering to only attributes that have values.
  • AttributeValue validator for integer, decimal, boolean, string, and collection attribute types.

Usage

Useful model helpers:

  • Group::tree()
  • Group::move(int $orderIndex, ?int $parentId)
  • Attribute::move(int $orderIndex, int $groupId)
  • Attribute::searchableKey()

Build a grouped EAV payload:

use LaravelEnso\Eav\Services\Eav;

$data = (new Eav($attributes, $values))->data(filtered: true);

Validate an incoming raw attribute value:

use LaravelEnso\Eav\Services\AttributeValue;

AttributeValue::validates($attribute, $value);

API

HTTP routes

Groups:

  • GET api/eav/groups
  • POST api/eav/groups
  • PATCH api/eav/groups/{group}
  • DELETE api/eav/groups/{group}
  • PATCH api/eav/groups/{group}/move
  • GET api/eav/groups/options

Attributes:

  • GET api/eav/attributes/{group}/create
  • POST api/eav/attributes
  • GET api/eav/attributes/{attribute}/edit
  • PATCH api/eav/attributes/{attribute}
  • DELETE api/eav/attributes/{attribute}
  • PATCH api/eav/attributes/{attribute}/move

Values:

  • POST api/eav/values/store
  • PATCH api/eav/values/{value}
  • DELETE api/eav/values/{value}
  • GET api/eav/values/options

Depends On

Required Enso packages:

  • laravel-enso/core ↗
  • laravel-enso/helpers ↗
  • laravel-enso/migrator ↗

Runtime companion packages:

  • laravel-enso/dynamic-methods ↗
  • laravel-enso/rememberable ↗
  • laravel-enso/tables ↗

Companion frontend package:

  • @enso-ui/eav ↗
Edit this page on GitHub
Last Updated: 4/20/2026, 6:07:14 PM
Prev
Dynamic Methods
Next
Emag