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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zojaji/laravel-workflow

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

General-purpose workflow engine for Laravel with Spatie integration.

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

Since Dec 2Pushed 7mo 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 today

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

29

—

LowBetter than 57% of packages

Maintenance65

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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

214d 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/cashier

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

2.6k29.9M148](/packages/laravel-cashier)[laravel/pulse

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

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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