PHPackages                             hadimazalan/laravel-approval-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. hadimazalan/laravel-approval-workflow

ActiveLibrary

hadimazalan/laravel-approval-workflow
=====================================

A reusable, headless Laravel package for multi-level approval workflows with delegation, OTP hooks, notifications, SLA tracking, and auditability.

v0.0.1(5d ago)00MITPHPPHP ^8.2

Since Jun 5Pushed yesterdayCompare

[ Source](https://github.com/hadimazalan/laravel-approval-workflow)[ Packagist](https://packagist.org/packages/hadimazalan/laravel-approval-workflow)[ RSS](/packages/hadimazalan-laravel-approval-workflow/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (6)Versions (2)Used By (0)

Laravel Approval Workflow
=========================

[](#laravel-approval-workflow)

A reusable, headless Laravel package for multi-level approval workflows. It ships with a fluent API, database-backed workflow instances, multi-level approval, delegation, OTP hooks, pluggable notification channels, SLA tracking, history, and a full audit trail.

- **Namespace:** `Hadimazalan\ApprovalWorkflow`
- **Composer package:** `hadimazalan/laravel-approval-workflow`
- **Laravel:** `^10.0 | ^11.0 | ^12.0`
- **PHP:** `^8.2`

Why this package?
-----------------

[](#why-this-package)

Approval workflows are everywhere — claims, leave requests, purchase orders, content publishing, government applications. They share the same shape:

1. A thing is created.
2. It must be approved by N people in order.
3. Some approvals can be delegated.
4. Some approvals require an OTP challenge.
5. Every action must be auditable.

This package provides a clean, headless core for that shape. It is framework agnostic about **how** you build your UI and **who** your approvers are — those are pluggable.

Quick start
-----------

[](#quick-start)

```
use Hadimazalan\ApprovalWorkflow\Facades\Approval;
use App\Models\Claim;

$claim = Claim::create([...]);

Approval::for($claim)
    ->level('Head of Department')
    ->level('Finance')
    ->level('CEO')
    ->notifyBy(['email', 'whatsapp'])
    ->start();
```

That single call:

- Persists a polymorphic `ApprovalInstance` linked to your `$claim` model.
- Creates one `ApprovalStep` per level, in order.
- Resolves approvers via the configured `ApproverResolver`.
- Dispatches notifications to the first level's approvers via the configured channels.

Acting on a workflow
--------------------

[](#acting-on-a-workflow)

```
use Hadimazalan\ApprovalWorkflow\Facades\Approval;

$instance = $claim->approvalInstance;

Approval::approve($instance, $approver, remarks: 'Looks good.');
Approval::reject($instance, $approver, remarks: 'Insufficient evidence.');
Approval::delegate($instance, $fromUser, $toUser, reason: 'On leave.');
```

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

[](#installation)

```
composer require hadimazalan/laravel-approval-workflow
```

The service provider is auto-discovered.

Publish the config and migration:

```
php artisan vendor:publish --tag=approval-workflow-config
php artisan vendor:publish --tag=approval-workflow-migrations
php artisan migrate
```

Documentation
-------------

[](#documentation)

See [`docs/`](docs/) for full guides:

- [Installation &amp; configuration](docs/installation.md)
- [Fluent API](docs/fluent-api.md)
- [Models &amp; relationships](docs/models.md)
- [Custom approver resolvers](docs/resolvers.md)
- [Notification channels](docs/notifications.md)
- [OTP providers](docs/otp.md)
- [SLA &amp; escalation](docs/sla.md)
- [Audit history](docs/audit.md)
- [Contributing](docs/contributing.md)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

Unknown

Total

1

Last Release

5d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11846272?v=4)[Hadi Mazalan](/maintainers/hadimazalan)[@hadimazalan](https://github.com/hadimazalan)

---

Top Contributors

[![hadimazalan](https://avatars.githubusercontent.com/u/11846272?v=4)](https://github.com/hadimazalan "hadimazalan (2 commits)")

---

Tags

laravelotpworkflowAuditmulti leveldelegationapprovalapproval-workflow

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.4k](/packages/larastan-larastan)[laravel/cashier

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

2.5k28.4M134](/packages/laravel-cashier)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)

PHPackages © 2026

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