Skip to content
JuragerPublic

About

Generic EAV (Entity-Attribute-Value) system for Laravel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Jurager/Eav

Latest Stable Version Total Downloads PHP Version Require License Ko-fi

Add typed, localized attributes to Eloquent models, with support for inheritance and select fields.

$product->eav()->set('color', 'blue')->save();

$product->eav()->value('color'); // 'blue'

Requirements

PHP >= 8.4 and Laravel 13.x

Installation

composer require jurager/eav

See installation and setup. The full documentation is also available online.

Testing

vendor/bin/phpunit

The suite runs on SQLite in memory. To run it on PostgreSQL, which has its own column types and indexes, point it at an empty database:

DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_DATABASE=eav_test DB_USERNAME=postgres vendor/bin/phpunit

License

Open source, licensed under the MIT license.

About

Generic EAV (Entity-Attribute-Value) system for Laravel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages