Skip to content

Installation Setup

Jean-Marc Strauven edited this page Aug 6, 2025 · 2 revisions

πŸš€ Installation & Setup

← Home | Your First Flow β†’

Get Laravel Flowpipe up and running in your Laravel application in just a few steps.

πŸ“‹ Requirements

  • PHP 8.1 or higher
  • Laravel 9.0 or higher
  • Composer

πŸ“¦ Installation

1. Install via Composer

composer require grazulex/laravel-flowpipe

2. Publish Configuration (Optional)

php artisan vendor:publish --provider="Grazulex\LaravelFlowpipe\LaravelFlowpipeServiceProvider"

This creates config/flowpipe.php with the following default settings:

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Flow Definitions Path
    |--------------------------------------------------------------------------
    |
    | Directory where your YAML flow definitions are stored.
    | Relative to your Laravel application root.
    |
    */
    'definitions_path' => 'flows',

    /*
    |--------------------------------------------------------------------------
    | Default Step Namespace
    |--------------------------------------------------------------------------
    |
    | Default namespace for step classes when using simple class names
    | in YAML files.
    |
    */
    'step_namespace' => 'App\\Flowpipe\\Steps',

    /*
    |--------------------------------------------------------------------------
    | Group Definitions Path
    |--------------------------------------------------------------------------
    |
    | Directory where your YAML group definitions are stored.
    |
    */
    'groups_path' => 'groups',

    /*
    |--------------------------------------------------------------------------
    | Tracing Configuration
    |--------------------------------------------------------------------------
    |
    | Configure execution tracing and debugging features.
    |
    */
    'tracing' => [
        'enabled' => env('FLOWPIPE_TRACING_ENABLED', true),
        'tracer' => 'default',
    ],

    /*
    |--------------------------------------------------------------------------
    | Queue Configuration
    |--------------------------------------------------------------------------
    |
    | Configure queue integration for asynchronous flow execution.
    |
    */
    'queue' => [
        'connection' => env('FLOWPIPE_QUEUE_CONNECTION', 'default'),
        'queue' => env('FLOWPIPE_QUEUE_NAME', 'flowpipe'),
    ],
];

πŸ“ Directory Structure

After installation, create the recommended directory structure:

your-laravel-app/
β”œβ”€β”€ flows/                          # YAML flow definitions
β”‚   β”œβ”€β”€ user-registration.yaml
β”‚   β”œβ”€β”€ order-processing.yaml
β”‚   └── content-moderation.yaml
β”œβ”€β”€ groups/                         # Reusable step groups
β”‚   β”œβ”€β”€ user-validation.yaml
β”‚   β”œβ”€β”€ payment-processing.yaml
β”‚   └── notifications.yaml
└── app/
    └── Flowpipe/
        β”œβ”€β”€ Steps/                  # PHP step classes
        β”‚   β”œβ”€β”€ ValidateInputStep.php
        β”‚   β”œβ”€β”€ CreateUserStep.php
        β”‚   └── SendEmailStep.php
        └── Conditions/             # Custom conditions
            └── EmailEnabledCondition.php

πŸ”§ Environment Configuration

Add these optional environment variables to your .env file:

# Enable/disable tracing (default: true)
FLOWPIPE_TRACING_ENABLED=true

# Queue connection for async flows
FLOWPIPE_QUEUE_CONNECTION=redis
FLOWPIPE_QUEUE_NAME=workflows

βœ… Verification

Test your installation by running:

php artisan flowpipe:list

You should see the Laravel Flowpipe commands available.

🎯 What's Next?

  1. Create Your First Flow - Build a simple workflow
  2. Understanding YAML Flows - Learn the YAML syntax
  3. PHP Steps - Create custom step classes

πŸ†˜ Troubleshooting

Common Issues

"Class not found" errors

  • Ensure your step classes are properly namespaced
  • Check the step_namespace configuration
  • Run composer dump-autoload

YAML files not found

  • Verify the definitions_path configuration
  • Ensure YAML files are in the correct directory
  • Check file permissions

Need Help?

πŸš€ Laravel Flowpipe

🏠 Home

🏁 Getting Started

πŸ“š Core Concepts

πŸš€ Advanced Features

πŸ› οΈ Tools & Configuration

πŸ“– Examples


πŸ”— GitHub Repository

Clone this wiki locally