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

Product Eav

LicenseStablePHPIssuesMerge Requests

Description

Product Eav extends the core product module with dynamic EAV attributes, groupings, importers, and searchable payload updates.

The package plugs itself into the existing products flow by replacing the product form builder, update controller, and validation request. It also attaches dynamic methods and relations to products so attribute values can be read, grouped, and synchronized from the product model itself.

It is intended for Enso applications where products require a scalable attribute set that changes across categories or business lines.

Installation

Install the package:

composer require laravel-enso/product-eav

Run the package migrations:

php artisan migrate

This package works on top of laravel-enso/products and laravel-enso/eav; it does not expose its own standalone UI.

Features

  • Rebinds the core product form builder to add an Attributes tab and EAV payload.
  • Rebinds product update handling and validation to persist EAV values together with the base product.
  • Registers product dynamic methods such as syncEav(), getEav(), and attributes().
  • Registers dynamic relations for product values, attribute groups, and reverse product lookups from EAV values.
  • Observes EAV value updates and reindexes affected products when searchable providers are enabled.
  • Ships import templates and validators for attribute groupings and product EAV imports.

Usage

The package extends the existing products form. The added Attributes tab is injected as a slot-backed section inside the product form template.

Typical write flow:

$product->syncEav($payload['eav']);

The dynamic method delegates to the package update service and can optionally preserve existing values by using the second $withoutDetaching flag.

When searchable providers are active and a filterable EAV value changes, the observer re-syncs affected products into the search index.

API

Product bindings

The package replaces these laravel-enso/products services:

  • form builder
  • update controller
  • product validation request

Dynamic product methods

  • attributes()
  • eav()
  • getEav()
  • syncEav(array $config, bool $withoutDetaching = false)

Observer

  • LaravelEnso\\ProductEav\\Observers\\Value

Behavior:

  • watches updates on LaravelEnso\\Eav\\Models\\Value
  • filters only changed, filterable attributes
  • re-syncs affected products through the searchable provider

Depends On

Required Enso packages:

  • laravel-enso/core ↗
  • laravel-enso/dynamic-methods ↗
  • laravel-enso/eav ↗
  • laravel-enso/products ↗
Edit this page on GitHub
Last Updated: 4/20/2026, 6:26:25 PM
Prev
Permissions
Next
Product Lots