Overview

DBFlow is a model-first approval workflow engine for Laravel and Filament. It attaches approvals, workflow tasks, reject flows, and audit trails to your Eloquent models.

This documentation covers Core (dbflowlabs/core), Filament Standard (dbflowlabs/filament), and Pro (dbflowlabs/filament-pro) where noted.

Alpha notice: Pin exact package tags for production. dbflowlabs/core and dbflowlabs/filament are on Packagist.

Quick start

  1. Install Core — Composer install and migrations
  2. Build Your First Workflow — refund approval walkthrough
  3. Add HasWorkflow — trait on your model
  4. Start a workflowDBFlow::start() from a business action
  5. Approve / reject — task handling and reject strategies
  6. View timeline — audit history in Filament

Optional: Try Live Demo — no local install required.

How DBFlow works

  1. Eloquent model — your domain record
  2. Workflow definition — steps, transitions, assignees
  3. Workflow instance — a run on that record
  4. Pending task — waiting for an approver
  5. Approve or rejectDBFlow::approve() / reject()
  6. Business continues — status updates via WorkflowHooks or your logic

Workflow state lives in dbflow_workflow_* tables. Your application keeps business logic.

Layers: Core runs workflows → Filament provides UI → Pro visual builder (preview). See Architecture.

Maturity

DBFlow is in public alpha. Before production use:

Learning paths

Laravel developers

  1. Eloquent modelsHasWorkflow trait
  2. Code-defined workflows — JSON definitions and sync
  3. Build Your First Workflow
  4. Workflow Hooks — host status mapping
  5. Testing Workflows — PHPUnit patterns

Host wiring (providers, resolvers, guards): Host Integration.

Filament developers

  1. Filament UI — install and register the panel
  2. Filament Resource Actions — start from resources
  3. My Tasks — approval inbox
  4. Workflow Timeline — instance history

Walkthroughs: Refund Approval · Purchase Request.

Visual builder (preview)

  1. Pro Visual Builder
  2. ProCanvasField
  3. Conditions
  4. Preview Limitations

Pro is in Early Access at $129/year (Creem). Core executes workflows; Pro helps design definitions.

Advanced topics

Reference

Install snippet

Requirements: PHP 8.3+, Laravel 13+, Composer 2+

composer require dbflowlabs/core
php artisan vendor:publish --tag=dbflow-migrations
php artisan migrate
use DbflowLabs\Core\Traits\HasWorkflow;

class Refund extends Model
{
    use HasWorkflow;
}

Next: Build Your First Workflow →

Something wrong? Open an issue on GitHub