PHPackages                             fabpl/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. fabpl/laravel-model-status

AbandonedArchivedLibrary

fabpl/laravel-model-status
==========================

Laravel package to assign statuses to Eloquent Models

1.0.2(5y ago)17MITPHPPHP ^7.3|^8.0

Since Feb 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fabpl/laravel-model-status)[ Packagist](https://packagist.org/packages/fabpl/laravel-model-status)[ RSS](/packages/fabpl-laravel-model-status/feed)WikiDiscussions main Synced 2d ago

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

Laravel Model Status
====================

[](#laravel-model-status)

Assign statuses to your Eloquent Model.

[![styleci.io](https://camo.githubusercontent.com/5c61293abe9aae6bc10e08ec0be78d0cdd6b0434ef30c0ceeaef75fa65212e24/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3333373438333437342f736869656c64)](https://camo.githubusercontent.com/5c61293abe9aae6bc10e08ec0be78d0cdd6b0434ef30c0ceeaef75fa65212e24/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3333373438333437342f736869656c64)

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

[](#installation)

Install package via composer:

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

Run install artisan command:

```
php artisan model-status:install
```

Optionally you can publish `config` files with:

```
php artisan model-status:publish
```

Migrate the `statuses` table:

```
php artisan migrate
```

Usage
-----

[](#usage)

Add the `HasStatuses` trait to a model and defines available status.

```
use Fabpl\ModelStatus\HasStatuses;

class Post extends Model
{
    use HasStatuses;

    /**
     * Get available status list.
     *
     * @return array
     */
    public function getAvailableStatus(): array
    {
        return ['draft', 'published', 'archived'];
    }
}
```

### Set a new status

[](#set-a-new-status)

You can set a new status like this:

```
$postModel->setStatus('published');
```

### Retrieving statuses

[](#retrieving-statuses)

You can get the current status name of model:

```
$postModel->status;
```

You can list assigned status:

```
$postModel->statuses;
```

You can deal with this relation like this:

```
$postModel->statuses()->whereName('published')->get();
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md).

### Security

[](#security)

If you discover any security related issues, please email planchettefabrice *at* hotmail.com instead of using the issue tracker.

Credits
-------

[](#credits)

- [Fabrice Planchette](https://fabpl.github.io)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

1916d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69b7c03d8ddf04ea840dc49371523f2c0956e2afafd98f5815d1da55cdb67824?d=identicon)[fabpl](/maintainers/fabpl)

---

Top Contributors

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

---

Tags

laravelmodelstatuslaravelmodelstatus

### Embed Badge

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

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[mpociot/versionable

Allows to create Laravel 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 Model versioning and restoring

7841.1M6](/packages/mpociot-versionable)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)

PHPackages © 2026

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