Installation
Requirements
Durable Workflow requires the following to run:
- PHP 8.1 or later
- Laravel 9 or later
Durable Workflow can be used with any queue driver that Laravel supports (except the sync driver), including:
- Amazon SQS
- Beanstalkd
- Database
- Redis
Each queue driver has its own prerequisites.
Durable Workflow also requires a cache driver that supports locks.
✨ SQS Support:
timer()andawaitWithTimeout()work with any duration, even when using the SQS queue driver. Durable Workflow automatically handles SQS's delay limitation transparently.
Installing Durable Workflow
Durable Workflow is installable via Composer. To install it, run the following command in your Laravel project:
composer require laravel-workflow/laravel-workflow
After installing, you must also publish the migrations. To publish the migrations, run the following command:
php artisan vendor:publish --provider="Workflow\Providers\WorkflowServiceProvider" --tag="migrations"
Once the migrations are published, you can run the migrate command to create the workflow tables in your database:
php artisan migrate
Running Workers
Durable Workflow uses queues to run workflows and activities in the background. You will need to either run the queue:work command or use Horizon to run your queue workers. Without a queue worker, workflows and activities will not be processed. You cannot use the sync driver with queue workers.