hyn/state-machine
Composer 安装命令:
composer require hyn/state-machine
包简介
Flexible state machine library that perfectly works with Laravels Eloquent models.
README 文档
README
The state machine is a flexible library that helps you move Eloquent models from States through Transitions while emitting events along the way.
Example
Let's say we have a Cat, who does two things, being
In order to become Awake from his initial state being Asleep, the cat has to
Now if we look at the state machine definition we can see the above is perfectly mapped out.
Installation
composer require hyn/state-machine
Read more about installation and configuration on state-machine.readme.io.
Tests
Run the tests with:
vendor/bin/phpunit
统计信息
- 总下载量: 2.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: mit
- 更新时间: 2016-10-12