PHPackages                             abdylreshit/laravel-eav - 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. [Database &amp; ORM](/categories/database)
4. /
5. abdylreshit/laravel-eav

ActiveLibrary[Database &amp; ORM](/categories/database)

abdylreshit/laravel-eav
=======================

A lightweight EAV package for Laravel: add dynamic, typed attributes to any Eloquent model with validation and easy querying.

v0.1.1(6mo ago)09MITPHPPHP ^8.2

Since Oct 28Pushed 6mo agoCompare

[ Source](https://github.com/Abdylreshit/laravel-eav)[ Packagist](https://packagist.org/packages/abdylreshit/laravel-eav)[ Docs](https://github.com/abdylreshit/laravel-eav)[ RSS](/packages/abdylreshit-laravel-eav/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Laravel EAV
===========

[](#laravel-eav)

A lightweight, powerful EAV (Entity-Attribute-Value) package for Laravel. Add dynamic, typed attributes to any Eloquent model without modifying your database schema. Perfect for e-commerce platforms, CMS systems, and applications requiring flexible data structures.

Features
--------

[](#features)

✨ **Dynamic Attributes** - Add unlimited attributes to any model without schema changes
🎯 **Type Support** - String, text, integer, decimal, boolean, date, datetime, JSON, image, and file types
✅ **Validation Ready** - Built-in validation support for attribute values
🔍 **Easy Querying** - Filter models by EAV attributes with fluent API
🌍 **Translatable** - Support for multi-language attribute names
📦 **Zero Configuration** - Works out of the box with sensible defaults
🚀 **Performance Optimized** - Efficient queries with eager loading support

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

[](#installation)

Install the package via Composer:

```
composer require abdylreshit/laravel-eav
```

The package will auto-discover and register its service provider.

Configuration
-------------

[](#configuration)

Publish the migration:

```
php artisan vendor:publish --provider="Abdylreshit\LaravelEav\Providers\LaravelEavServiceProvider" --tag="migrations"
```

Run the migration:

```
php artisan migrate
```

This creates the necessary tables: `attributes` and `attribute_values`.

Quick Start
-----------

[](#quick-start)

### 1. Add the Trait to Your Model

[](#1-add-the-trait-to-your-model)

```
