PHPackages                             sablesoft/yii2-promo - 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. sablesoft/yii2-promo

ActiveYii2-extension

sablesoft/yii2-promo
====================

Package

v1.0(7y ago)11MITPHP

Since Jan 20Pushed 7y ago2 watchersCompare

[ Source](https://github.com/sablesoft/yii2-promo)[ Packagist](https://packagist.org/packages/sablesoft/yii2-promo)[ RSS](/packages/sablesoft-yii2-promo/feed)WikiDiscussions master Synced yesterday

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

This testwork yii2 extension. When this extension is used, a promo module with crud and rest api controllers will append to web app.

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

[](#installation)

WARNING! You need a pre-installed yii2 application with a connected database. The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Just add

```
"sablesoft/yii2-promo": "*"

```

to the require section of your `composer.json` file and run

```
$ composer update

```

Migration
---------

[](#migration)

After the extension has been installed, start the migration:

```
$ ./yii migrate --migrationPath=vendor/sablesoft/yii2-promo/migrations

```

After that you can test the module through the browser and through the api requests.

Web Browser Testing
-------------------

[](#web-browser-testing)

Just open your installed yii2 application at route `/promo` and follow the instructions.

Rest Api Testing
----------------

[](#rest-api-testing)

Use curl or any request service, such as Postman, to make api requests with different methods and parameters.

Entry point:

```
http:/your-app.com/promo/api

```

You must use the authorization header of the form:

```
Authorization: Bearer

```

For testing try tokens `adminToken`, `demoToken` and `disabled` token. Also use the header for json content ( `Content-Type` and `Accept` ). You can receive or change promo codes for both id and code.

Example for getting some promo code by id:

```
$ curl -i -H "Content-Type:application/json" -H "Authorization: Bearer adminToken" "http://localhost/promo/api/1"

```

Example for updating some promo code data by code:

```
$ curl -i -H "Content-Type:application/json" -H "Authorization: Bearer adminToken" -X PUT \
-d '{"zoneName":"Minsk"}' "http://localhost/promo/api/test"

```

For more information about api actions check the [Yii2 RESTful Web Services Guide](http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html)

Code Docs
---------

[](#code-docs)

To generate the documentation, use the command

```
vendor/bin/apidoc api vendor/sablesoft/yii2-promo ./docs/api

```

For more info check the Yii2 original [documentation](http://www.yiiframework.com/doc-2.0/ext-apidoc-index.html).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

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

Unknown

Total

1

Last Release

2669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d9b0f205c28816c7412e64ffc94536e0c7e796bcf1b2066caea1c6167cb2c0f?d=identicon)[sablesoft](/maintainers/sablesoft)

---

Top Contributors

[![sablesoft](https://avatars.githubusercontent.com/u/13505325?v=4)](https://github.com/sablesoft "sablesoft (12 commits)")

---

Tags

yii2promosablesofttestwork

### Embed Badge

![Health badge](/badges/sablesoft-yii2-promo/health.svg)

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

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)

PHPackages © 2026

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