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

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

hkan/approval
=============

5201PHP

Since Jan 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/hkan/approval)[ Packagist](https://packagist.org/packages/hkan/approval)[ RSS](/packages/hkan-approval/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Approval
========

[](#approval)

[![Build status](https://camo.githubusercontent.com/f50e825eba49a5ff4313b268fbe36587fecd8d3569a5d62b6a6950cd2a4cb06a/68747470733a2f2f7472617669732d63692e6f72672f686b616e2f617070726f76616c2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/f50e825eba49a5ff4313b268fbe36587fecd8d3569a5d62b6a6950cd2a4cb06a/68747470733a2f2f7472617669732d63692e6f72672f686b616e2f617070726f76616c2e7376673f6272616e63683d6d6173746572)

Content approval system for Laravel. Works just like Laravel's own soft deleting system.

Requirements
------------

[](#requirements)

PHP &gt;= 5.5

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

[](#installation)

**Step 1:** Add the following line to your `composer.json`'s `require` array.

```
"hkan/approval": "dev-master"

```

**Step 2:** Add `is_approved` column to your desired models' tables (Recommended migration line)

```
$table->boolean('is_approved')->default(false);

```

**Step 3:** Copy the following line to the `providers` array of `app/config/app.php`

```
'Hkan\Approval\ApprovalServiceProvider'

```

**Step 4:** Add the trait to your model(s).

```
use \Hkan\Approval\Traits\ApprovalTrait;

```

Usage
-----

[](#usage)

#### Approve and unapprove posts

[](#approve-and-unapprove-posts)

```
$post->approve()
$post->unapprove()

```

#### Approved and unapproved posts

[](#approved-and-unapproved-posts)

```
Post::all() // Only approved posts
Post::onlyUnapproved()->get() // Only unapproved posts
Post::withUnapproved()->get() // Both approved and unapproved posts

```

Contribution
------------

[](#contribution)

Issues, pull requests and feature requests are welcome.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2135597?v=4)[Hakan Aktas](/maintainers/hkan)[@hkan](https://github.com/hkan)

---

Top Contributors

[![hkan](https://avatars.githubusercontent.com/u/2135597?v=4)](https://github.com/hkan "hkan (7 commits)")

### Embed Badge

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

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

###  Alternatives

[foroco/php-browser-detection

Ultra fast PHP library to detect browser, OS, platform and device type by User-Agent parsing

1545.5M7](/packages/foroco-php-browser-detection)[previewtechs/cpanel-whm-api

Manage WHM and cPanel servers with PHP

221.1k](/packages/previewtechs-cpanel-whm-api)

PHPackages © 2026

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