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

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

sebdesign/laravel-state-machine
===============================

Winzou State Machine service provider for Laravel

v3.4.7(2mo ago)3401.3M↑14%60[2 issues](https://github.com/sebdesign/laravel-state-machine/issues)[1 PRs](https://github.com/sebdesign/laravel-state-machine/pulls)1MITPHPPHP ^7.2.5 | ^8.0CI passing

Since Jan 14Pushed 2mo ago10 watchersCompare

[ Source](https://github.com/sebdesign/laravel-state-machine)[ Packagist](https://packagist.org/packages/sebdesign/laravel-state-machine)[ Docs](https://github.com/sebdesign/laravel-state-machine)[ RSS](/packages/sebdesign-laravel-state-machine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (42)Used By (1)

Winzou State Machine service provider for Laravel
=================================================

[](#winzou-state-machine-service-provider-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c3b85efc983cdc58e0e84685e6dd980017d7487daf874bbaa814a2264bd2b111/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656264657369676e2f6c61726176656c2d73746174652d6d616368696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sebdesign/laravel-state-machine)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/d1ce17780745dc13ace7dd4ef2e569504ad517734e299c2cc023572d7c800659/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73656264657369676e2f6c61726176656c2d73746174652d6d616368696e652f74657374732e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/sebdesign/laravel-state-machine/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/377819239afc6f085b74725f724324f7ea63ff7b3790a9b2a4f53c9a310ad1b0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f73656264657369676e2f6c61726176656c2d73746174652d6d616368696e652f6d61737465723f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sebdesign/laravel-state-machine/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ada2ce3c0489dfc5ec5cda2e262280855c534638b859d6493fec6a1e51540746/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73656264657369676e2f6c61726176656c2d73746174652d6d616368696e652f6d61737465723f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sebdesign/laravel-state-machine/?branch=master)[![StyleCI](https://camo.githubusercontent.com/d1a542b39e28fa09806684fb98eea525275608fa30bcf8b8a86af791699f121d/68747470733a2f2f7374796c6563692e696f2f7265706f732f37383839333335362f736869656c643f7374796c653d666c61742d737175617265)](https://styleci.io/repos/78893356)

This is a Laravel service provider for [winzou/state-machine](https://github.com/winzou/state-machine). It provides dependency injection for the `StateMachineFactory`. You can also use Laravel's service container to resolve class methods for the callbacks. A facade is also available for convenience.

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

[](#installation)

You can install the package via composer. This package requires Laravel 7.0 or higher.

For previous Laravel versions, please check the [compatibility table](#versions).

Then require the package using the command-line interface:

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

### Versions

[](#versions)

If you need to install this package in older Laravel installations, use the table below to find a compatible version.

PackageLaravelPHP**^3.0**`^7.0 - ^12.0``^7.2.5`**^2.0**`5.5.* - ^6.0``^7.0`**^1.0**`5.1.* - 5.8.*``^5.5.9 | ^7.0`Since version 5.5, Laravel uses package auto-discovery, so you don't need to manually add the ServiceProvider and the facade. If you don't use auto-discovery or you are using an older version, add the service provider and the facade in config/app.php.

```
