A flexible, domain-driven approval workflow engine for Laravel applications. Designed for projects that require multi-step approval chains, such as government systems, enterprise platforms, and internal business workflows.
Define and evolve workflows over time without breaking existing instances with built-in versioning support
Assign tasks to users, roles (Spatie Permission integration), or managers with flexible resolution
Support for 'any' (one person approves) or 'all' (consensus required) approval modes per step
Built-in support for task deadlines and breach recording with automatic tracking
Automatic redirection of tasks based on user availability (vacation/out-of-office)
Detailed event logging (started, assigned, acted, breached, completed) for every action
Override default flow based on actions (approve/reject/changes_requested)
No controllers, routes, views, or APIs enforced. You decide how workflows are exposed
Optionally scope workflows, tasks, and approvers by team_id for multi-tenant applications
composer require putheakhem/approval-workflow
php artisan vendor:publish --tag=approval-workflow-config
php artisan vendor:publish --tag=approval-workflow-migrations
php artisan migrate
use PutheaKhem\ApprovalWorkflow\Concerns\HasWorkflow;
class ServiceRequest extends Model
{
use HasWorkflow;
}
$instance = $service->startWorkflow(
workflowKey: 'service-approval',
context: [
'team_id' => 1,
'requester_id' => auth()->id(),
],
teamId: 1,
startedBy: auth()->id(),
);
These concerns are intentionally handled by the consuming application: