PHPackages                             jobmetric/laravel-state-machine - 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. jobmetric/laravel-state-machine

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

jobmetric/laravel-state-machine
===============================

This package is for implementing the Eloquent State Machine of various Laravel projects.

2.5.1(6mo ago)651MITPHPPHP &gt;=8.0.1CI passing

Since Jan 1Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/jobmetric/laravel-state-machine)[ Packagist](https://packagist.org/packages/jobmetric/laravel-state-machine)[ Docs](https://doc.jobmetric.net/package/laravel-state-machine)[ GitHub Sponsors](https://github.com/sponsors/majidmohammadian)[ RSS](/packages/jobmetric-laravel-state-machine/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (6)Versions (11)Used By (0)

State Machine for Eloquent laravel
==================================

[](#state-machine-for-eloquent-laravel)

This package is for implementing the Eloquent State Machine of various Laravel projects.

Install via composer
--------------------

[](#install-via-composer)

Run the following command to pull in the latest version:

```
composer require jobmetric/laravel-state-machine
```

Documentation
-------------

[](#documentation)

When it comes to changing the state of a `model` field, and we want to change it and then do other things or more clearly react to another `action`, you can use this package.

### Usage

[](#usage)

#### 1. Suppose you have an order `model` with a `status` field.

[](#1-suppose-you-have-an-order-model-with-a-status-field)

```
