yiier/yii2-request-behavior

The request behavior for the Yii framework

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 14

Forks: 1

Open Issues: 0

Type:yii2-extension

v0.1 2015-09-11 06:20 UTC

This package is auto-updated.

Last update: 2024-03-25 22:59:37 UTC


README

The request behavior for the Yii framework

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiier/yii2-request-behavior "dev-master"

or add

"yiier/yii2-request-behavior": "dev-master"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your Controller code by :

public function behaviors()
{
    return [
        // code ...
        [
            'class' => ThrottleBehavior::className(),
            'message'=>'您操作太频繁了,10秒内不能重复操作。'
        ],
    ];
}