PHPackages                             yii2mod/yii2-moderation - 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. yii2mod/yii2-moderation

ActiveYii2-extension

yii2mod/yii2-moderation
=======================

A simple Content Moderation System for Yii2 that allows you to Approve or Reject resources like posts, comments, etc.

1.2(9y ago)789.7k↓26.8%[1 issues](https://github.com/yii2mod/yii2-moderation/issues)4MITPHPPHP &gt;=5.5

Since Nov 17Pushed 6y ago2 watchersCompare

[ Source](https://github.com/yii2mod/yii2-moderation)[ Packagist](https://packagist.org/packages/yii2mod/yii2-moderation)[ RSS](/packages/yii2mod-yii2-moderation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (4)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii2 Moderation Extension
=========================

[](#yii2-moderation-extension)

A simple Content Moderation System for Yii2 that allows you to Approve or Reject resources like posts, comments, etc.

[![Latest Stable Version](https://camo.githubusercontent.com/3dd858613afee604379ecff3a387f0a84a97a45d019188ebdbbf32144d8acf1d/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d6d6f6465726174696f6e2f762f737461626c65)](https://packagist.org/packages/yii2mod/yii2-moderation)[![Total Downloads](https://camo.githubusercontent.com/91ee3ff986d029d8b4739a52b1d1bbedc006019b611b38f75d985c60aa0a28a7/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d6d6f6465726174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/yii2mod/yii2-moderation)[![License](https://camo.githubusercontent.com/3951e88e12af89fc613fc810c421b513cd1e5ca958410f4b853b404aa5fb1fc0/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d6d6f6465726174696f6e2f6c6963656e7365)](https://packagist.org/packages/yii2mod/yii2-moderation)[![Build Status](https://camo.githubusercontent.com/7d22e78654d4828127721f13d31bf3446a0028a9574973bcf79c7f5f1f61c3d3/68747470733a2f2f7472617669732d63692e6f72672f796969326d6f642f796969322d6d6f6465726174696f6e2e7376673f6272616e63683d312e30)](https://travis-ci.org/yii2mod/yii2-moderation)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist yii2mod/yii2-moderation "*"

```

or add

```
"yii2mod/yii2-moderation": "*"

```

to the require section of your composer.json.

Configuration
-------------

[](#configuration)

To enable moderation for a model, use the `yii2mod\moderation\ModerationBehavior` behavior and add the `status` and `moderated_by` columns to your model's table.

Create a migration to add the new columns. Example Migration:

```
