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

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

nagy/laravel-status
===================

manage status column for elqouent models

v1.0(8y ago)521MITPHP

Since Feb 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mohamednagy/laravel-status)[ Packagist](https://packagist.org/packages/nagy/laravel-status)[ RSS](/packages/nagy-laravel-status/feed)WikiDiscussions master Synced yesterday

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

Laravel-Status
==============

[](#laravel-status)

manage status like moderation or anysomething else for elqouent models

Install
=======

[](#install)

```
$ composer install nagy/laravel-status

```

Using!
======

[](#using)

add the status column to your migration

```
$table->tinyInteger('status')->default(0);

```

define the status into your elquent model

```
protected static $status = [
        0 => 'pending',
        1 => 'approved',
        2 => 'rejected'
];

```

if you need to override the databse *column* or rename it

```
 protected static $status_column = 'status';

```

include the `HasStatus` into your model

```
use Nagy\LaravelStatus\HasStatus;

class User extends Model
{
    use HasStatus;

```

exmaples
--------

[](#exmaples)

*laravel-status* works daynamicly according to your defined status, for example for status `pending` then you will be able use it as `isPending`,`setPending`, `onlyPending`

```
// check if model has status
$model->isPending();

// update model to another status
$model->setApproved();

// get only models that has status
Model::onlyPending()->get();

// or use within a query builder
Model::where('age', '>', 18)->onlyPending()->get();

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3010d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d512bfef7b0383c619864124277bdb30cd9deea8f01fb78286cbeda31742e192?d=identicon)[mohamednagy](/maintainers/mohamednagy)

---

Top Contributors

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

---

Tags

laravelphp

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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