PHPackages                             zojaji/laravel-workflow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zojaji/laravel-workflow

ActiveLibrary

zojaji/laravel-workflow
=======================

General-purpose workflow engine for Laravel with Spatie integration.

v0.2.0(5mo ago)01MITBladePHP ^8.2

Since Dec 2Pushed 5mo agoCompare

[ Source](https://github.com/Alireza-Zojaji/laravel-workflow)[ Packagist](https://packagist.org/packages/zojaji/laravel-workflow)[ RSS](/packages/zojaji-laravel-workflow/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Laravel Workflow
================

[](#laravel-workflow)

General-purpose workflow engine for Laravel, with default integration to Spatie's `laravel-permission`.

Full developer documentation: `docs/guide.en.md`Examples: `docs/examples.en.md`Persian documentation: `docs/guide.fa.md`, `docs/examples.fa.md`

Installation
------------

[](#installation)

- Require the package:
    - `composer require zojaji/laravel-workflow`
- Publish configs, migrations, and views:
    - `php artisan vendor:publish --tag=workflow-config`
    - `php artisan vendor:publish --tag=workflow-migrations`
    - `php artisan vendor:publish --tag=workflow-views`
- Run migrations:
    - `php artisan migrate`

Dependencies
------------

[](#dependencies)

- `spatie/laravel-permission` as a primary dependency
    - Add the `Spatie\Permission\Traits\HasRoles` trait to your User model

Model Configuration
-------------------

[](#model-configuration)

- In `config/workflow.php`:
    - `workflow.models.role`: Role model class (default: `Spatie\Permission\Models\Role`)
    - `workflow.models.user`: User model class (default: `config('auth.providers.users.model')`)

Quick Usage
-----------

[](#quick-usage)

- Create a task with decision &amp; assignment:
    - `\Zojaji\Workflow\Facades\Workflow::completeAndRoute($taskId, $userId, $context)`
- Finalize user selection for the `role_direct_user` method:
    - `\Zojaji\Workflow\Facades\Workflow::finalizeSelection($instanceId, $stateId, $taskName, $userId, $roleId, $decisionOptions)`

Routes
------

[](#routes)

- API is loaded under `api/workflow/*` and admin pages under `admin/workflows/*`.

License
-------

[](#license)

- MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance72

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

159d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56d9981a02be63011d8d5defc92a9d02ffe16573e541180e2b95eebfdcefe51f?d=identicon)[Alireza-Zojaji](/maintainers/Alireza-Zojaji)

---

Top Contributors

[![Alireza-Zojaji](https://avatars.githubusercontent.com/u/38731072?v=4)](https://github.com/Alireza-Zojaji "Alireza-Zojaji (11 commits)")

---

Tags

spatielaravelworkflowpermission

### Embed Badge

![Health badge](/badges/zojaji-laravel-workflow/health.svg)

```
[![Health](https://phpackages.com/badges/zojaji-laravel-workflow/health.svg)](https://phpackages.com/packages/zojaji-laravel-workflow)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
