Requirements
PHP
PHP 8.1 or higher
Laravel
Laravel 9.0, 10.0, 11.0, 12.0, or 13.0
Queue
A configured Laravel queue driver (database, Redis, etc.)
Database
MySQL, PostgreSQL, SQLite, or SQL Server
Install via Composer
Install the package
Install Durable Workflow using Composer:The package will be automatically discovered by Laravel.
Run migrations
Publish and run the migrations to create the required database tables:This creates the following tables:
workflows- Stores workflow instances and their stateworkflow_logs- Records each activity execution for replayworkflow_signals- Stores signals sent to workflowsworkflow_timers- Manages scheduled timersworkflow_exceptions- Tracks exceptions that occur during executionworkflow_relationships- Manages parent-child workflow relationships
All tables use the default database connection unless you configure a different connection in the package configuration.
Configure your queue
Durable Workflow uses Laravel’s queue system. Ensure you have a queue driver configured in For production, Redis is recommended:
config/queue.php.For development, you can use the database driver:config/queue.php
config/queue.php
Optional configuration
You can publish the configuration file if you need to customize the package settings:config/workflows.php file where you can configure:
- Database connection
- Queue connection and queue name
- Serialization settings
- Webhook authentication
Verify installation
Create a test workflow to verify everything is working:app/Workflows/TestWorkflow.php- Your workflow classapp/Activities/TestActivity.php- Your activity class
If the
make:workflow and make:activity commands are not available, ensure you’ve run composer dump-autoload after installing the package.Next steps
Quick start guide
Learn how to create and run your first workflow