Looking to hire Laravel developers? Try LaraJobs

laravel-state-machine maintained by fer-projekt

Description
Helpes your control your state using enums.
Last update
2024/04/25 08:58 (dev-main)
License
Links
Downloads
268

Comments
comments powered by Disqus

Laravel State Machine

This package simplify controlling the transition between model states, allowing you to prevent unlogically transition and also controlling the initial state of the model using the PHP enums.

Each enum allows you to define your states, the allowed transitions and the initial state, all in one place.

Installation

You can install the package via composer:

composer require fer-projekt/laravel-state-machine

Usage

Development

Clone the package from the github:

git clone https://github.com/fer-projekt/laravel-state-machine.git

cd laravel-state-machine

Starting & stopping docker

docker-compose up -d
docker-compose down

Install dependencies via composer and testing:

docker-compose exec app bash
composer update
phpunit

License

The MIT License (MIT). Please see License File for more information.