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

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

afiqiqmal/approval-laravel
==========================

approval-laravel

2.0.0(11mo ago)43.3k3[1 issues](https://github.com/afiqiqmal/approval-laravel/issues)MITPHPPHP ^8.2CI failing

Since Jan 21Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/afiqiqmal/approval-laravel)[ Packagist](https://packagist.org/packages/afiqiqmal/approval-laravel)[ Docs](https://github.com/afiqiqmal/approval-laravel)[ GitHub Sponsors](https://github.com/afiqiqmal)[ RSS](/packages/afiqiqmal-approval-laravel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (24)Used By (0)

Approval Laravel
================

[](#approval-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/21bb6fc696199f76f299168e03587fe8907d5c41f44be165e30a6f2e509cae69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6166697169716d616c2f617070726f76616c2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/afiqiqmal/approval-laravel)[![Total Downloads](https://camo.githubusercontent.com/a0a31c46ee68a3fe9173ea168560e1abefad85966dcaf63e2b54e6bcefe04102/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6166697169716d616c2f617070726f76616c2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/afiqiqmal/approval-laravel)[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)

[![](https://camo.githubusercontent.com/ed7ace56e6f827ce1e6aef0d5310b2292efe5753514aec71ce3d32b4ac84dd92/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f417070726f76616c2e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6166697169716d616c253246617070726f76616c2d6c61726176656c267061747465726e3d646f6d696e6f73267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/ed7ace56e6f827ce1e6aef0d5310b2292efe5753514aec71ce3d32b4ac84dd92/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f417070726f76616c2e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6166697169716d616c253246617070726f76616c2d6c61726176656c267061747465726e3d646f6d696e6f73267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

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

[](#installation)

You can install the package via composer:

```
composer require afiqiqmal/approval-laravel
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Afiqiqmal\Approval\ApprovalServiceProvider" --tag="migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Afiqiqmal\Approval\ApprovalServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

#### Add `RequireApproval` trait to the model

[](#add-requireapproval-trait-to-the-model)

```
class Entity extends Model
{
    use RequireApproval;

    //plenty of public function can be customize
}
```

#### Add `HasApprovable` trait to the User Model

[](#add-hasapprovable-trait-to-the-user-model)

```
class User extends Authenticable
{
    use HasApprovable;
    //...
    //...
}
```

#### Query

[](#query)

Include all items including not approve

```
Model::getQuery()->includeNotApprove()->get();
```

List all items with not approve

```
Model::getQuery()->onlyNotApprove()->get();
```

Approve and Reject Item

```
$item = Model::first();
$item->approve()->approve($remarks); // optional remarks
$item->approve()->reject($remarks); // optional remarks
```

Vice versa to get the approval model

```
$approval = Approval::first();

$approval->approvable; // Get model
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Hafiq](https://github.com/afiqiqmal)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

[![](https://camo.githubusercontent.com/fae49c14c08b15cedc0f829bf690717f2edabe33f88a6c67f6f8f7225702abc6/68747470733a2f2f692e696d6775722e636f6d2f5932677172326a2e706e67)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance46

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 53.4% 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 ~72 days

Recently: every ~356 days

Total

23

Last Release

348d ago

Major Versions

1.6.0 → 2.0.02025-05-30

PHP version history (2 changes)1.0.0PHP ^7.4|^8.0

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1285084ec2d00e6c1442d03992cd156772da7267efdcbe59ac913c0676a9eb89?d=identicon)[afiqiqmal](/maintainers/afiqiqmal)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (189 commits)")[![afiqiqmal](https://avatars.githubusercontent.com/u/9051312?v=4)](https://github.com/afiqiqmal "afiqiqmal (54 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (46 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (7 commits)")[![irfanm96](https://avatars.githubusercontent.com/u/42065936?v=4)](https://github.com/irfanm96 "irfanm96 (5 commits)")[![mywira](https://avatars.githubusercontent.com/u/108710869?v=4)](https://github.com/mywira "mywira (4 commits)")[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (3 commits)")[![sixlive](https://avatars.githubusercontent.com/u/5108034?v=4)](https://github.com/sixlive "sixlive (3 commits)")[![willemvb](https://avatars.githubusercontent.com/u/1336390?v=4)](https://github.com/willemvb "willemvb (3 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (3 commits)")[![brendt](https://avatars.githubusercontent.com/u/6905297?v=4)](https://github.com/brendt "brendt (2 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (2 commits)")[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (2 commits)")[![kallepyorala](https://avatars.githubusercontent.com/u/40248184?v=4)](https://github.com/kallepyorala "kallepyorala (2 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (1 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (1 commits)")[![osbre](https://avatars.githubusercontent.com/u/23292709?v=4)](https://github.com/osbre "osbre (1 commits)")[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (1 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (1 commits)")

---

Tags

approvalhacktoberfesthacktoberfest2021laravelafiqiqmalapproval-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.0M314](/packages/illuminate-redis)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)

PHPackages © 2026

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