PHPackages                             likai/yii-restful - 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. [API Development](/categories/api)
4. /
5. likai/yii-restful

ActiveYii-extension[API Development](/categories/api)

likai/yii-restful
=================

Yii RESTful URL Manager

v1.0.2(12y ago)7974BSD-3-ClausePHPPHP &gt;=5.3.0

Since Aug 22Pushed 12y ago2 watchersCompare

[ Source](https://github.com/tlikai/yii-restful)[ Packagist](https://packagist.org/packages/likai/yii-restful)[ Docs](https://github.com/tlikai/yii-restful)[ RSS](/packages/likai-yii-restful/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Yii RESTful URL Manager
=======================

[](#yii-restful-url-manager)

Requirement
-----------

[](#requirement)

- PHP &gt;= 5.3.0

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

[](#installation)

Add depend to your project composer.json file

```
{
    "require": {
        "yii/yiisoft": "dev-master",
        "likai/yii-restful": "dev-master"
    }
}

```

After, run `composer update` update composer packages

Usage
-----

[](#usage)

### 1. Add `topics` resource

[](#1-add-topics-resource)

```
return array(
    'urlManager'=>array(
        'class' => 'Likai\\YiiRestful\\UrlManager',
        'urlFormat' => 'path',
        'showScriptName' => false,
        'resources' => array(
            'topics',
        ),
    ),
);

```

UrlManager will generate 5 url rules and bind to the controller, like the following

```
`GET` http://yourdomain/topics          => TopicsController::actionIndex
`GET` http://yourdomain/topics/{id}     => TopicsController::actionShow
`POST` http://yourdomain/topics         => TopicsController::actionCreate
`PUT` http://yourdomain/topics/{id}     => TopicsController::actionUpdate
`DELETE` http://yourdomain/topics/{id}  => TopicsController::actionDelete

```

### 2. Specified parameters

[](#2-specified-parameters)

```
'resources' => array(
    'topics',
    array('posts', 'only' => array('index', 'create')), // just bind PostsController::actionIndex, PostsController::actionCreate action
    array('users', 'except' => array('delete', 'update')), // except UsersController::actionDelete, UsersController::actionUpdate action
),

```

ChangeLog
---------

[](#changelog)

**Version v1.0.1 and v1.0.2**

- Added composer supported
- Added namespace supported

**Version v1.0.0**

- First release

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

3

Last Release

4686d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95a7e28bfad31da4aecd922e5a056f33edda44817de7137e5c8fbc1634080349?d=identicon)[likai](/maintainers/likai)

---

Top Contributors

[![tlikai](https://avatars.githubusercontent.com/u/1356974?v=4)](https://github.com/tlikai "tlikai (9 commits)")[![galdiolo](https://avatars.githubusercontent.com/u/448620?v=4)](https://github.com/galdiolo "galdiolo (1 commits)")

---

Tags

extensionyiirestful

### Embed Badge

![Health badge](/badges/likai-yii-restful/health.svg)

```
[![Health](https://phpackages.com/badges/likai-yii-restful/health.svg)](https://phpackages.com/packages/likai-yii-restful)
```

###  Alternatives

[light/yii2-swagger

swagger intergation with yii2

153835.2k4](/packages/light-yii2-swagger)[ignatenkovnikita/yii2-swagger

Swagger UI v3 intergation with yii2

128.1k](/packages/ignatenkovnikita-yii2-swagger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
