PHPackages                             githubjeka/rest-yii2 - 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. githubjeka/rest-yii2

ActiveProject

githubjeka/rest-yii2
====================

Yii 2 Rest Api Template

1551.8k75[8 issues](https://github.com/githubjeka/yii2-rest/issues)PHP

Since Dec 23Pushed 8y ago26 watchersCompare

[ Source](https://github.com/githubjeka/yii2-rest)[ Packagist](https://packagist.org/packages/githubjeka/rest-yii2)[ RSS](/packages/githubjeka-rest-yii2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TEST REST API APPLICATION ON [Yii2](https://github.com/yiisoft/yii2)
--------------------------------------------------------------------

[](#test-rest-api-application-on-yii2)

[![Build Status](https://camo.githubusercontent.com/ddf3133ffef8b114d30e5cb8b154c7daaa8aa9bacaf297cac0b19440263971a0/68747470733a2f2f7472617669732d63692e6f72672f6769746875626a656b612f796969322d726573742e737667)](https://travis-ci.org/githubjeka/yii2-rest)

[Demo Server](https://yii2-rest-githubjeka.c9.io/rest/web/)

### INSTALLATION

[](#installation)

**Install via Composer**

If you do not have [Composer](http://getcomposer.org/), you may install it by following the [instructions at getcomposer.org](https://getcomposer.org/doc/00-intro.md).

You can then install the application using the following commands:

```
composer global require "fxp/composer-asset-plugin:~1.0.0"
composer create-project --prefer-dist -s dev "githubjeka/rest-yii2" .

```

### GETTING STARTED

[](#getting-started)

After you install the application, you have to conduct the following steps to initialize the installed application. You only need to do these once for all.

- Run command `php init --env=Development` to initialize the application with a specific environment.
- Create a new database and adjust the `components['db']` configuration in `common/config/main-local.php` accordingly.
- Apply migrations with console command `php yii migrate`. This will create tables needed for the application to work.
- Set document roots of your Web server:

for rest `/path/to/yii-application/rest/web/` and using the URL `http://localhost/`for backend `/path/to/yii-application/backend/web/` and using the URL `http://backend-localhost/`

Use `demo/demo` to login into the application on . See [`/rest/config/main.php`](/rest/config/main.php) for more info by URL

### URL RULE

[](#url-rule)

See [rest/config/main.php](rest/config/main.php)

API available:

```
// version 1
OPTIONS /index.php?r=v1/user/login
POST /index.php?r=v1/user/login

OPTIONS /index.php?r=v1/posts
GET /index.php?r=v1/posts
GET /index.php?r=v1/posts/ID
POST /index.php?r=v1/posts
PUT /index.php?r=v1/posts/ID
DELETE /index.php?r=v1/posts/ID

OPTIONS /index.php?r=v1/comments
GET /index.php?r=v1/comments
GET /index.php?r=v1/comments/ID
POST /index.php?r=v1/comments
PUT /index.php?r=v1/comments/ID
DELETE /index.php?r=v1/comments/ID

//version 2
OPTIONS /index.php?r=v2/user/login
POST /index.php?r=v2/user/login
```

You can hide `index.php` from URL. For that see [server.md](server.md)

### ADDITIONALLY

[](#additionally)

[See client on AngularJS](https://github.com/githubjeka/angular-yii2)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ddab25b4518a59d7c831acc7abc94c849f900b64fa35a8e1018babdda715b16?d=identicon)[githubjeka](/maintainers/githubjeka)

---

Top Contributors

[![githubjeka](https://avatars.githubusercontent.com/u/874234?v=4)](https://github.com/githubjeka "githubjeka (41 commits)")[![bryant1410](https://avatars.githubusercontent.com/u/3905501?v=4)](https://github.com/bryant1410 "bryant1410 (1 commits)")

### Embed Badge

![Health badge](/badges/githubjeka-rest-yii2/health.svg)

```
[![Health](https://phpackages.com/badges/githubjeka-rest-yii2/health.svg)](https://phpackages.com/packages/githubjeka-rest-yii2)
```

PHPackages © 2026

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