PHPackages                             pingu1/yii2-minimal-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. pingu1/yii2-minimal-api

ActiveProject[Framework](/categories/framework)

pingu1/yii2-minimal-api
=======================

Yii 2 Minimal API template

1.1(8y ago)251MITPHPPHP &gt;=5.4.0

Since Jun 16Pushed 8y ago2 watchersCompare

[ Source](https://github.com/pingu1/yii2-minimal-api)[ Packagist](https://packagist.org/packages/pingu1/yii2-minimal-api)[ RSS](/packages/pingu1-yii2-minimal-api/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (10)Versions (4)Used By (0)

Basic Yii2 API application
==========================

[](#basic-yii2-api-application)

This repo is a purified empty application to build Restful APIs based on [Yii2 framework](https://github.com/yiisoft/yii2-app-basic). You can find a lot of documentation related to this framework, and the best place to start is maybe their [official documentation](http://www.yiiframework.com/doc-2.0/). This repo contains the minimal structure for an API application with the appropriate configuration already written and working. Without any database, you can still use the `HelloController` to get some dummy `Hello World message`.

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

[](#installation)

1. Download composer: `curl -s https://getcomposer.org/installer | php`
2. Create a new project based on this one `composer.phar create-project pingu1/yii2-minimal-api api`
3. Init the Git repository in your new project `git init`

Setting up your web server
--------------------------

[](#setting-up-your-web-server)

The default setup to server Yii2 projects are also valid for this application. Please read the documentation to setup your [Apache](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#recommended-apache-configuration-) or [Nginx](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#recommended-nginx-configuration-) server.

Code structure
--------------

[](#code-structure)

The code is structured as such:

```
api
-- commands
-- common
---- controllers
---- models
-- config
-- modules
---- v1
------ controllers
------ models
-- runtime
-- tests
-- web
vendor

```

- The `api` directory is basically the root of your application
- The `commands` folder contains all the console scripts
- The `common` directory contains all models and controllers that could be shared between different versions of your api
- The `modules` directory will contain the different versions of your api
- The `runtime` directory will stores cache and log files generated during runtime
- The `tests` directory will contain all your test files (Yii2 runs with [Codeception](http://codeception.com/))
- The `web` directory only contains the entry script of your api

Simple Hello World
------------------

[](#simple-hello-world)

Once your webserver up and ready, you should be able to access the following urls:

-
-

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

3200d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a26b838a7c1e14efc0aabcf69c6e60f72ca6a959f0c787daadc54680e222c20?d=identicon)[pingu1](/maintainers/pingu1)

---

Top Contributors

[![pingu1](https://avatars.githubusercontent.com/u/6096291?v=4)](https://github.com/pingu1 "pingu1 (5 commits)")

---

Tags

apiframeworkyii2

### Embed Badge

![Health badge](/badges/pingu1-yii2-minimal-api/health.svg)

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

###  Alternatives

[funson86/yii2-adminlte

Yii 2 Advanced Application Template with Adminlte Theme

1492.2k](/packages/funson86-yii2-adminlte)

PHPackages © 2026

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