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(8mo ago)01MITBladePHP ^8.2

Since Dec 2Pushed 8mo 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 1w 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

28

—

LowBetter than 51% of packages

Maintenance59

Moderate activity, may be stable

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

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

3345.4M354](/packages/psalm-plugin-laravel)[laravel/cashier

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

2.6k31.8M162](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)[laravel/pulse

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

1.7k16.3M154](/packages/laravel-pulse)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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