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

ActiveYii2-extension

indifferend/yii2-moderation
===========================

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

2.2(4y ago)071MITPHPPHP &gt;=7.1

Since Jun 2Pushed 4y ago1 watchersCompare

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

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

 [ ![](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/da0a23b1a44c232b1e524192acdd6bff40df3d92bf3a3ad7552a4dedcf0638a2/68747470733a2f2f706f7365722e707567782e6f72672f696e646966666572656e642f796969322d6d6f6465726174696f6e2f762f737461626c65)](https://packagist.org/packages/indifferend/yii2-moderation)[![Total Downloads](https://camo.githubusercontent.com/31dd51e3bbd75dc52273914b791310a23625f93fea16750cc05cab536291e506/68747470733a2f2f706f7365722e707567782e6f72672f696e646966666572656e642f796969322d6d6f6465726174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/indifferend/yii2-moderation)[![License](https://camo.githubusercontent.com/281b8bd42830e2ea1c7ceee5a27ded9d4ad601dec5876d99b164c9840f807785/68747470733a2f2f706f7365722e707567782e6f72672f696e646966666572656e642f796969322d6d6f6465726174696f6e2f6c6963656e7365)](https://packagist.org/packages/indifferend/yii2-moderation)[![Build Status](https://camo.githubusercontent.com/6d3f17afb0bc4e54bc238353edf8e1e85647d0342a204bd0c9d374b1c322e50d/68747470733a2f2f7472617669732d63692e6f72672f696e646966666572656e642f796969322d6d6f6465726174696f6e2e7376673f6272616e63683d312e30)](https://travis-ci.org/indifferend/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 indifferend/yii2-moderation "*"

```

or add

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

```

to the require section of your composer.json.

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

[](#configuration)

To enable moderation for a model, use the `indifferend\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:

```
