javaabu / workflows
Dynamic workflows for Laravel: versioned workflow definitions with steps, transitions, assignees and conditions, instances with tasks, history and events, fluent definitions you can seed, a keyboard-accessible drag-and-drop builder in Inertia React and Blade, developer-defined actions, step data col
Requires
- php: ^8.4
- illuminate/console: ^12.0 || ^13.0
- illuminate/contracts: ^12.0 || ^13.0
- illuminate/database: ^12.0 || ^13.0
- illuminate/events: ^12.0 || ^13.0
- illuminate/http: ^12.0 || ^13.0
- illuminate/notifications: ^12.0 || ^13.0
- illuminate/queue: ^12.0 || ^13.0
- illuminate/routing: ^12.0 || ^13.0
- illuminate/support: ^12.0 || ^13.0
- illuminate/validation: ^12.0 || ^13.0
- illuminate/view: ^12.0 || ^13.0
- javaabu/form-builder: ^1.0@dev
- javaabu/forms: ^2.0@dev
- javaabu/manifest: ^1.0@dev
- javaabu/permissions: ^3.0@dev
- javaabu/stencil: ^1.0@dev
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- inertiajs/inertia-laravel: ^2.0
- javaabu/boost-javaabu-guidelines: ^1.4
- javaabu/notifications: ^1.0@dev
- javaabu/translatable: ^3.0@dev
- laravel/ai: ^1.3
- laravel/pint: ^1.24
- orchestra/testbench: ^10.0 || ^11.0
- phpunit/phpunit: ^11.5.3 || ^12.5.8
Suggests
- inertiajs/inertia-laravel: Renders the pages with Inertia React when workflows.views is inertia (^2.0)
- javaabu/notifications: The notify action sends javaabu/notifications notifications: every channel, the bell, preferences (^1.0)
- javaabu/translatable: Workflow names, step names and transition labels in every language (^3.0)
- laravel/ai: The assistant that builds or changes a workflow from a description (^1.3)
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-15 10:55:46 UTC
README
Dynamic workflows for Laravel: leave requests, purchase approvals, applications, anything that goes through steps where people decide what happens next.
- Definitions with steps (start, task, decision, action, end), transitions, assignees and conditions, versioned: instances stay on the version they started with.
- Instances with tasks, an inbox per user, a full history and events.
- Fluent definitions for seeders, idempotent and lockable to code.
- A visual builder: drag, connect and edit steps, all by keyboard too, in Inertia React and Blade.
- Actions: notify (javaabu/notifications), update the record, call a webhook, set data, or your own.
- Step data with javaabu/form-builder forms.
- A tester that shows the path a run takes with sample data, and an optional laravel/ai assistant that designs workflows.
- Permissions through javaabu/permissions for any guard and user model. Optional javaabu/translatable. Dhivehi and RTL.
use Javaabu\Workflows\Definitions\Assignee; use Javaabu\Workflows\Definitions\Step; use Javaabu\Workflows\Definitions\Transition; use Javaabu\Workflows\Facades\Workflows; Workflows::define('leave-request') ->name(['en' => 'Leave request', 'dv' => 'ޗުއްޓީގެ އެދުން']) ->for(LeaveRequest::class) ->steps([ Step::start()->form('leave-request'), Step::task('review')->assignTo(Assignee::subject('manager'))->runs('notify', ['to' => [['type' => 'assignees']], 'title' => 'A leave request to review']), Step::end('approved')->runs('update_model', ['attributes' => ['status' => 'approved']]), Step::end('rejected'), ]) ->transitions([ Transition::make('submit')->from('start')->to('review'), Transition::make('approve')->from('review')->to('approved')->label('Approve')->color('success'), Transition::make('reject')->from('review')->to('rejected')->label('Reject')->color('danger')->requireComment()->skipForm(), ]) ->sync(); // routes/web.php Route::workflows(['guard' => 'web_admin', 'prefix' => 'admin/workflows', 'name' => 'admin.workflows']); Route::workflowTasks(); // /tasks // anywhere $instance = $leave->startWorkflow('leave-request', by: $request->user(), data: $request); $instance->transition('approve', by: $manager, comment: 'ރަނގަޅު');
Documentation
The docs are in docs/, indexed for assistants in llms.txt.
Testing
composer test pnpm test
Changelog
See CHANGELOG.
Contributing
See CONTRIBUTING.
Security
If you discover a security issue, email info@javaabu.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). See License File for more information.