PHPackages                             jantinnerezo/laravel-model-meta - 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. jantinnerezo/laravel-model-meta

AbandonedArchivedLibrary

jantinnerezo/laravel-model-meta
===============================

1.0.1(5y ago)144MITPHPPHP ^7.2

Since Aug 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jantinnerezo/laravel-model-meta)[ Packagist](https://packagist.org/packages/jantinnerezo/laravel-model-meta)[ Docs](https://github.com/jantinnerezo/laravel-model-meta)[ RSS](/packages/jantinnerezo-laravel-model-meta/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Model Meta
==================

[](#laravel-model-meta)

A very basic and simple metable trait that adds additional fields to your existing eloquent models. Main purpose for this package is the ability to add meta fields for MySQL versions lower than 5.7 without using MySQL JSON fields.

I used it personally for my projects that is hosted with MySQL version lower than 5.7. I recommend using other packages that supports MySQL JSON fields if your project's MySQL version is 5.7 only.

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

[](#installation)

You can install the package via composer:

```
composer require jantinnerezo/laravel-model-meta
```

Usage
-----

[](#usage)

Create a migration that adds new field called "meta" to your existing table and then add the Metable trait to the model.

```
use Jantinnerezo\LaravelModelMeta\Metable;

class YourModel extends Model
{
	use Metable;
}
```

### Set meta

[](#set-meta)

```
$yourModel = YourModel::find(1);
$yourModel->setMeta(
	'intro',  // Key
	"Hey Jude, don't make it bad!" // Value
);
```

### Sync multiple meta

[](#sync-multiple-meta)

```
$yourModel = YourModel::find(1);
$yourModel->syncMeta([
	'key1' => 'First key',
	'key2' => 'Second key'
]);
```

### Remove meta

[](#remove-meta)

```
$yourModel = YourModel::find(1);
$yourModel->removeMeta('key');
```

### Get single meta

[](#get-single-meta)

```
$yourModel = YourModel::find(1);
$yourModel->getMeta('key');
```

### Get multiple meta

[](#get-multiple-meta)

```
$yourModel = YourModel::find(1);
$yourModel->getMetaOnly(['key1','key2']);
```

### Get all meta

[](#get-all-meta)

```
$yourModel = YourModel::find(1);
$yourModel->getAllMeta();
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jantinn Erezo](https://github.com/jantinnerezo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~124 days

Total

2

Last Release

1984d ago

PHP version history (2 changes)1.0.0PHP ^7.1

1.0.1PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c4866fb74e50074b2e4945de0c47b3836396ada466b80caac4e7452e60cbc6e?d=identicon)[jantinnerezo](/maintainers/jantinnerezo)

---

Top Contributors

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

---

Tags

eloquent-modelslaravelmetablemodelsjantinnerezolaravel-model-meta

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jantinnerezo-laravel-model-meta/health.svg)

```
[![Health](https://phpackages.com/badges/jantinnerezo-laravel-model-meta/health.svg)](https://phpackages.com/packages/jantinnerezo-laravel-model-meta)
```

###  Alternatives

[jantinnerezo/livewire-alert

This package provides a simple alert utilities for your livewire components.

8041.2M20](/packages/jantinnerezo-livewire-alert)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[jantinnerezo/livewire-range-slider

A Tall Stack wrapper for noUiSlider Range Slider

1611.1k1](/packages/jantinnerezo-livewire-range-slider)

PHPackages © 2026

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