PHPackages                             maks757/yii2-honors - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. maks757/yii2-honors

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

maks757/yii2-honors
===================

This component allows users to work with the achievements.

1.1.4(9y ago)024GNU Public LicensePHP

Since Sep 22Pushed 9y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

yii2 honors
===========

[](#yii2-honors)

status extension dev
--------------------

[](#status-extension-dev)

#### Install

[](#install)

```
composer.phar require maks757/yii2-honors

```

or

```
composer require maks757/yii2-honors

```

and applying migrations

```
php yii migrate --migrationPath=@vendor/maks757/yii2-honors/migrations

```

or

```
yii migrate --migrationPath=@vendor/maks757/yii2-honors/migrations

```

#### Configuration

[](#configuration)

##### main.php (config)

[](#mainphp-config)

```
'modules' => [
    'honor' => [
        'class' => \bl\honors\HonorsModule::className()
    ],
],
'components' => [
    // Images config
    'imagableHonor' => [
        'class' => 'bl\imagable\Imagable',
        'imageClass' => \bl\honors\components\image\CreateImageImagine::className(),
        'nameClass' => \bl\honors\components\image\GenerateName::className(),
        'imagesPath' => '@frontend/web/honorImage',
        'categories' => [
            'category' => [
                'honor' => [
                    'origin' => false,
                    'size' => [
                        'long' => [
                            'width' => 500,
                            'height' => 500,
                        ],
                        'short' => [
                            'width' => 200,
                            'height' => 200,
                        ],
                    ]
                ],
            ]
        ]
    ],
    // ...
]
```

url to list honor = admin panel url + /honor/honor/list url to create honor = admin panel url + /honor url to list user honor = admin panel url + /honor/honor/user

#### Using

[](#using)

Go to add new honor [![Alt text](/image/img1.PNG "Go to add new honor")](/image/img1.PNG)and add new honor [![Alt text](/image/img2.PNG "Add new honor")](/image/img2.PNG)and add honor to user [![Alt text](/image/img3.PNG "Add honor to user")](/image/img3.PNG)

#### Using example

[](#using-example)

```
//action
//honors
    $honors = HonorUser::find()->where(['user_id' => $userId])->with(['honor.translations'])->all();
//
//view

            Honors:
