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

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

troojaan/laravel-state-machine
==============================

Winzou State Machine service provider for Laravel

v1.2.4(8y ago)0341MITPHPPHP ^5.5.9 || ^7.0

Since Jan 14Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (10)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/e3feee8c06a12e23c9d8cbdcdf6bff445e770290598df0289c02163c828a97f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74726f6f6a61616e2f6c61726176656c2d73746174652d6d616368696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/troojaan/laravel-state-machine)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/47cdd0116f183478c8187802572feb13aff0d3c26310ab8f314611f1b02f1d03/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74726f6f6a61616e2f6c61726176656c2d73746174652d6d616368696e652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/troojaan/laravel-state-machine)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d48ff21640a636d7b9f50fc485ce6df9948a3f69e16ee5673cb6d9fc04acf572/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74726f6f6a61616e2f6c61726176656c2d73746174652d6d616368696e652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/troojaan/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).

Features
--------

[](#features)

- It provides dependency injection for the `StateMachineFactory`.
- You can use Laravel's service container to resolve class methods for the callbacks, along with their dependencies.
- It allows you to listen for transition events using Laravel's event dispatcher.
- A facade is also available for convenience.

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

[](#installation)

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

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

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.

```
