PHP Package: spatie/laravel-model-states
Laravel Model States is a versatile PHP library for defining state machines with ease, enhancing workflow management in Laravel applications.
Package Description
Laravel Model States is a powerful PHP library designed to simplify the implementation of state machines in Laravel projects. By seamlessly integrating with Eloquent models, this library facilitates the management of complex workflows, ensuring efficient state transitions and improved code organization. With Laravel Model States, developers can streamline development processes and enhance application scalability.
Download Latest Version: 2.12.1

Previous Versions
Code Integration Example
Make sure to include the correct namespace and class paths for proper usage.
<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/laravel-model-states/2.12.1/loader.php';
require_once 'libs/illuminate/support/12.33.0/loader.php';
require_once 'libs/php/{lib_version}/loader.php';
use Spatie\LaravelModelStates\State;
use Spatie\LaravelModelStates\StateConfig;
$obj = new State();
echo '✅ Test OK: ' . get_class($obj);
?>
We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.
Community Discussion
Ask questions, share tips, or report issues below.