An open API service indexing awesome lists of open source software.

https://github.com/yiier/yii2-request-behavior

The request behavior for the Yii framework
https://github.com/yiier/yii2-request-behavior

Last synced: 2 months ago
JSON representation

The request behavior for the Yii framework

Awesome Lists containing this project

README

        

Request Behavior for Yii 2
==========================
The request behavior for the Yii framework

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

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

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 :

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