deesoft/yii2-rest Yii2 rest extension

rest

yii2-rest

Yii2 rest extension

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require deesoft/yii2-rest "~1.0"

or add

"deesoft/yii2-rest": "~1.0"

to the require section of your composer.json file.

Usage

In controller


public function actions()
{
    return [
        'index' => [
            'class' => 'dee\rest\RestAction',
        ],
    ];
}

To use url rule. Set in config

        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                [
                    'class' => 'dee\rest\UrlRule',
                    'actions' => [
                        'post' => 'post/index',

                    ],
                ],
            ],
        ],

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

No stable releases.

Comments



No stable releases.



BSD-3-Clause license
Stats
4 github stars & 1 github forks
0 downloads in the last day
41 downloads in the last 30 days
12319 total downloads