PHPackages                             marmarait/laravel-dynamic-attributes - 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. marmarait/laravel-dynamic-attributes

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

marmarait/laravel-dynamic-attributes
====================================

Adds Dynamic Attributes to your Models

v1.02(7y ago)031MITPHP

Since Aug 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/marmarait/laravel-dynamic-attributes)[ Packagist](https://packagist.org/packages/marmarait/laravel-dynamic-attributes)[ RSS](/packages/marmarait-laravel-dynamic-attributes/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Laravel 5.5 Dynamic Attributes
==============================

[](#laravel-55-dynamic-attributes)

Overview
--------

[](#overview)

Add Additional Fields to your Models with a key value table

Install
-------

[](#install)

`composer require marmarait/laravel-dynamic-attributes`

Usage
-----

[](#usage)

- add the Trait "HasDynamicAttributes" to your model
- in the method "getDynamicAttributes" return an array with the dynamic attributes and their field types. Available are:

    - string
    - text
    - int
    - double
    - object
    - date
    - time
    - datetime
- Use it as you normally would with static attributes.

Example: If you want your Users Model to have an additional field named "country" with type string: Add HasDynamicAttributes to your User model Make the getDynamicAttributes method return `['country'=>'string']`

Set the field by assigning the property to the model:

`$user->country='Austria';`

Retrieving the Property is about the same:

`echo $user->country; // 'Austria'`

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2860d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11612794?v=4)[romeosemper](/maintainers/romeosemper)[@romeosemper](https://github.com/romeosemper)

---

Top Contributors

[![romeosemper](https://avatars.githubusercontent.com/u/11612794?v=4)](https://github.com/romeosemper "romeosemper (1 commits)")

### Embed Badge

![Health badge](/badges/marmarait-laravel-dynamic-attributes/health.svg)

```
[![Health](https://phpackages.com/badges/marmarait-laravel-dynamic-attributes/health.svg)](https://phpackages.com/packages/marmarait-laravel-dynamic-attributes)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
