Skip to content

Commit 1223266

Browse files
update readme
1 parent 3ce2f4c commit 1223266

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ $order->state->transitionTo(Processing::class);
8181

8282
### Laravel-StateFlow's Solution: Centralized State Topology
8383

84+
StateFlow supports **two approaches** for defining your state machine:
85+
86+
| Approach | Best For | Transitions Defined In |
87+
| --------------- | ------------------------------------- | ---------------------- |
88+
| **Traditional** | Self-contained states, IDE navigation | State classes or model |
89+
| **Hybrid Enum** | Centralized workflow visualization | Single enum file |
90+
91+
Both approaches are demonstrated in the [laravel-stateflow-demo](https://github.com/HPWebdeveloper/laravel-stateflow-demo): **Orders** (traditional) and **Bookings** (enum).
92+
8493
Laravel StateFlow solves this with **centralized workflow definition** — see your entire state machine at a glance:
8594

8695
```php
@@ -221,15 +230,6 @@ php artisan migrate
221230

222231
## Preparation in 4 simple Steps
223232

224-
StateFlow supports **two approaches** for defining your state machine:
225-
226-
| Approach | Best For | Transitions Defined In |
227-
| --------------- | ------------------------------------- | ---------------------- |
228-
| **Traditional** | Self-contained states, IDE navigation | State classes or model |
229-
| **Hybrid Enum** | Centralized workflow visualization | Single enum file |
230-
231-
Both approaches are demonstrated in the [laravel-stateflow-demo](https://github.com/HPWebdeveloper/laravel-stateflow-demo): **Orders** (traditional) and **Bookings** (enum).
232-
233233
### 1. Add State Column to Your Model
234234

235235
Add a `state` column to the model that will have state transitions. For example, if you have an `Order` model:

0 commit comments

Comments
 (0)