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

https://github.com/undefinedor/smartrest

A smart rest function for yii2
https://github.com/undefinedor/smartrest

yii2 yii2-extension

Last synced: 8 months ago
JSON representation

A smart rest function for yii2

Awesome Lists containing this project

README

          

# SmartRest

## 目的

官方提供的`yii\rest\urlRule`类必须声明controller属性。每次增加控制器的时候,都需要在`controller`属性中声明,过于繁琐。本项目解决了该问题。

## 安装
最佳方式是通过[Composer](https://getcomposer.org/download/) .

```
composer require undefinedor/smart-rest
```

## 使用方法

```php

'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'enableStrictParsing' => true,
'rules' => [
['class' => 'SmartRest\UrlRule'],
],
],

```