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'PHP >= 8.4 and Laravel 13.x
composer require jurager/eavSee installation and setup. The full documentation is also available online.
vendor/bin/phpunitThe 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/phpunitOpen source, licensed under the MIT license.