PHPackages                             elephantsgroup/eg-star-rating - 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. elephantsgroup/eg-star-rating

ActiveYii2-extension

elephantsgroup/eg-star-rating
=============================

Yii2 star rating module

1.0.1(7y ago)034[1 issues](https://github.com/ElephantsGroup/eg-star-rating/issues)4MITPHP

Since May 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ElephantsGroup/eg-star-rating)[ Packagist](https://packagist.org/packages/elephantsgroup/eg-star-rating)[ RSS](/packages/elephantsgroup-eg-star-rating/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (4)

To use Elephants Group star-rating module first you must install module, then you can use star-rating widget anywhere in your website.

Installation Steps:
===================

[](#installation-steps)

1. run

> php composer.phar require elephantsgroup/eg-star-rating "\*"

or add `"elephantsgroup/eg-star-rating": "~1"` to the require section of your composer.json file.

2. migrate database

> yii migrate --migrationPath=vendor/elephantsgroup/eg-star-rating/migrations

3. add star-rating module to common configuration (common/config.php file)

```
    ...
    'star-rating' => [
        'class' => 'elephantsGroup\starRating\Module',
    ],
    ...
]```

4) open access to module in common configuration

```'as access' => [
    'class' => 'mdm\admin\components\AccessControl',
    'allowActions' => [
        ...
        'star-rating/ajax/*',
        ...
    ]
]```

5) filter admin controller in frontend configuration (frontend/config.php file)

```'modules' => [
    ...
    'star-rating' => [
        'as frontend' => 'elephantsGroup\starRating\filters\FrontendFilter',
    ],
    ...
]```

5) filter ajax controller in backend configuration (backend/config.php file)

```'modules' => [
    ...
    'star-rating' => [
        'as backend' => 'elephantsGroup\starRating\filters\BackendFilter',
    ],
    ...
]```

Using star-rating widget
===

Anywhere in your code you can use star-rating widget as follows:
``````

You need to use Rate widget header in your page:
```use elephantsGroup\starRating\components\Rate;```

Rate widget parameters
---

- item (integer): to separate Rate between different items.
``````
``````

default value for item is 0
- service (integer): to separate star-rating between various item types.
``````

for example you can use different values for different modules in your app, and then use star-rating widget separately in modules.
default value for service is 0
- min_num (integer): minimum possible rate vote
``````

- view_file (string): the view file path for rendering

``````

you can use these variables in your customized view:
* service
* item
* min_num
* max_num
* rate_num

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~19 days

Total

2

Last Release

2895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d41e8f68e70f82997981e9652a2eecfa2ce3ca858f7336af1e4715a875e9aa7?d=identicon)[ElephantsGroup](/maintainers/ElephantsGroup)

---

Top Contributors

[![arezoumajd](https://avatars.githubusercontent.com/u/19835588?v=4)](https://github.com/arezoumajd "arezoumajd (2 commits)")[![JalalJaberi](https://avatars.githubusercontent.com/u/2640561?v=4)](https://github.com/JalalJaberi "JalalJaberi (1 commits)")

---

Tags

yii2extensionyiielephantsGroupsatr-rating

### Embed Badge

![Health badge](/badges/elephantsgroup-eg-star-rating/health.svg)

```
[![Health](https://phpackages.com/badges/elephantsgroup-eg-star-rating/health.svg)](https://phpackages.com/packages/elephantsgroup-eg-star-rating)
```

PHPackages © 2026

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