Skip to content

Commit bb13ea2

Browse files
update readme
1 parent 251bb1d commit bb13ea2

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ A modern, enterprise-ready state machine implementation for Laravel Eloquent mod
66

77
Author: Hamed Panjeh
88

9-
Laravel StateFlow is inspired by similar concepts found
10-
in [Spatie Laravel Model States](https://github.com/spatie/laravel-model-states), however, it is a fully independent, ground-up implementation with its own architecture and design decisions.
9+
Laravel StateFlow is inspired by similar concepts found in [Spatie Laravel Model States](https://github.com/spatie/laravel-model-states), however, it is a fully independent, ground-up implementation with its own architecture and design decisions.
1110
It combines the state pattern with state machines to deliver **enterprise-ready features**: automatic state class discovery, automatic transition discovery, permissions, UI metadata, history tracking, and API resources. **Laravel StateFlow maintains a single, unified topology of all possible states and transitions in your application's backing enum.** This centralized architecture ensures that state definitions remain synchronized across your entire application, eliminating inconsistencies between backend logic and frontend representations. For large, complex systems, managing state changes and transitions is no longer cumbersome or bug-prone as your system grows—a single enum serves as the definitive source of truth.
1211

1312
> 📦 **Demo Application:** See Laravel StateFlow in action with a complete order management demo at [laravel-stateflow-demo](https://github.com/HPWebdeveloper/laravel-stateflow-demo).

src/Actions/ExecuteTransition.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function authorize(TransitionData $data): bool
178178
}
179179
}
180180

181-
// Check state permission (Phase 5 will enhance this)
181+
// Check state permission
182182
if (StateFlow::hasFeature('permissions') && $data->performer) {
183183
$toStateClass = $data->toState;
184184

@@ -277,7 +277,7 @@ protected function handleSuccess(TransitionData $data, TransitionResult $result)
277277
{
278278
$this->context->recordHook('onSuccess');
279279

280-
// Record history if enabled (Phase 7)
280+
// Record history if enabled
281281
if ($this->shouldRecordHistory()) {
282282
$this->recordHistory($data, $result);
283283
$this->context->recordHook('historyRecorded');
@@ -425,7 +425,7 @@ protected function extractUserRole(TransitionData $data): string
425425
}
426426

427427
// -------------------------------------------------------------------------
428-
// History Recording (Phase 7)
428+
// History Recording
429429
// -------------------------------------------------------------------------
430430

431431
/**

0 commit comments

Comments
 (0)