PHPackages                             zoparga/laravel-model-status - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zoparga/laravel-model-status

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zoparga/laravel-model-status
============================

Add many status to many model with a single trait. E.g.: many status for a customer.

0.8.2(4y ago)066MITPHPPHP ^7.3|^8.0

Since Apr 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zoparga/laravel-model-status)[ Packagist](https://packagist.org/packages/zoparga/laravel-model-status)[ Docs](https://github.com/zoparga/laravel-model-status)[ GitHub Sponsors](https://github.com/zoparga)[ RSS](/packages/zoparga-laravel-model-status/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Add many address to many model with a single trait. E.g.: many shipping address for a customer.
===============================================================================================

[](#add-many-address-to-many-model-with-a-single-trait-eg-many-shipping-address-for-a-customer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2518c1c00d6d9b3160f5461e9c391c729a95729e1e205f9bf32e8440d7c6ae5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6f70617267612f6c61726176656c2d6d6f64656c2d7374617475732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zoparga/laravel-model-status)[![GitHub Tests Action Status](https://camo.githubusercontent.com/aae8057b85ba84c6c3647a6e41d6baf2d9387183f144e029d5e383ca97d43d41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a6f70617267612f6c61726176656c2d6d6f64656c2d7374617475732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/zoparga/laravel-model-status/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/27d5926b2aa21a0d4839986797e395487667a8d5da2da07ffa9e7356d46d5d9b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a6f70617267612f6c61726176656c2d6d6f64656c2d7374617475732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/zoparga/laravel-model-status/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/51bcc22af2b4ad826b607c78b07fab7ec8105eb246fe8c723c842eafed11092d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a6f70617267612f6c61726176656c2d6d6f64656c2d7374617475732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zoparga/laravel-model-status)

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

[](#installation)

You can install the package via composer:

```
composer require zoparga/laravel-model-status
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="zoparga\ModelStatus\ModelStatusServiceProvider" --tag="model-status-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="zoparga\ModelStatus\ModelStatusServiceProvider" --tag="laravel-model-status-config"
```

This is the contents of the published config file:

Usage
-----

[](#usage)

- publish migration file
- migrate
- add trait to model
- use it

Prepare model
-------------

[](#prepare-model)

use zoparga\\ModelStatus\\Traits\\ModelStatuseableTrait;

class {{model}} extends Model { use ModelStatuseableTrait; }

```
$model = \App\Models\Model::find(1);

$model->modelStatuses()->create([
        'name' => 'Default',
        'order' => 1,
        'is_enabled' => 1,
]);

$modelStatusId = 1;

$model->updateModelStatus($modelStatusId, [
        'name' => 'Ongoing',
        'order' => 2,
        'is_enabled' => 0,
]);

Or you can limit it here
$model->getLatestModelStatuses()->get();

Or you can limit it here
$model->getLatestModelStatuses()->limit(3)->get();

Of course you can get last created model status
$model->getLastModelStatus();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Papp Zoltán](https://github.com/zoparga)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

3

Last Release

1477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22a5be5fde39a2a8b568a6b58f19db59352605afe5ba0c7ae42deeb5990d1fb4?d=identicon)[zoparga](/maintainers/zoparga)

---

Top Contributors

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

---

Tags

laravellaravel-model-statuszoparga

###  Code Quality

TestsPest

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zoparga-laravel-model-status/health.svg)

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

###  Alternatives

[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[ziming/laravel-scrapingbee

A PHP Laravel Library for ScrapingBee

4310.6k](/packages/ziming-laravel-scrapingbee)

PHPackages © 2026

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