PHPackages                             ethercreative/yii2-app-api - 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. [Framework](/categories/framework)
4. /
5. ethercreative/yii2-app-api

ActiveProject[Framework](/categories/framework)

ethercreative/yii2-app-api
==========================

Yii 2 RESTful API Template

v0.4(9y ago)8994[1 issues](https://github.com/ethercreative/yii2-app-api/issues)MITPHPPHP &gt;=5.4.0

Since May 19Pushed 7y agoCompare

[ Source](https://github.com/ethercreative/yii2-app-api)[ Packagist](https://packagist.org/packages/ethercreative/yii2-app-api)[ Docs](http://www.ethercreative.co.uk/)[ RSS](/packages/ethercreative-yii2-app-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (5)Used By (0)

Yii 2 API Project Template
==========================

[](#yii-2-api-project-template)

REQUIREMENTS
------------

[](#requirements)

The minimum requirement by this project template that your Web server supports PHP 5.4.0.

INSTALLATION
------------

[](#installation)

### Install from an Archive File

[](#install-from-an-archive-file)

Extract the archive file downloaded from [github.com](https://github.com/mattether/yii2-app-api/archive/master.zip) to a directory named `api` that is directly under the Web root.

Set cookie validation key in `config/web.php` file to some random secret string:

```
'request' => [
    // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
    'cookieValidationKey' => '',
],
```

You can then access the application through the following URL:

```
http://localhost/api/web/

```

### Install via Composer

[](#install-via-composer)

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

You can then install this project template using the following command:

```
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
php composer.phar create-project --prefer-dist --stability=dev ethercreative/yii2-app-api api

```

Now you should be able to access the application through the following URL, assuming `api` is the directory directly under the Web root.

```
http://localhost/api/web/

```

CONFIGURATION
-------------

[](#configuration)

### Database

[](#database)

Edit the file `config/db.php` with real data, for example:

```
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2basic',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];
```

**NOTES:**

- Yii won't create the database for you, this has to be done manually before you can access it.
- Check and edit the other files in the `config/` directory to customize your application as required.
- Refer to the README in the `tests` directory for information specific to basic application tests.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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 ~49 days

Total

4

Last Release

3547d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/807df0a17d1291238650a6652a05231e0eecc1e7236480762cbb674a6fe61198?d=identicon)[mattether](/maintainers/mattether)

---

Tags

apiframeworkyii2project template

### Embed Badge

![Health badge](/badges/ethercreative-yii2-app-api/health.svg)

```
[![Health](https://phpackages.com/badges/ethercreative-yii2-app-api/health.svg)](https://phpackages.com/packages/ethercreative-yii2-app-api)
```

###  Alternatives

[izyue/yii2-app-advanced

Yii 2 Advanced Project Template

1291.9k](/packages/izyue-yii2-app-advanced)

PHPackages © 2026

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