ignatenkovnikita/yii2-addresses

Yii2 Module Addresses

Installs: 4 229

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 3

Open Issues: 0

Type:yii2-extension

v1.1 2018-10-20 06:21 UTC

This package is auto-updated.

Last update: 2024-11-29 04:46:49 UTC


README

Yii2 Module Addresses

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist ignatenkovnikita/yii2-addresses "*"

or add

"ignatenkovnikita/yii2-addresses": "*"
./console/yii migrate --migrationPath=@vendor/ignatenkovnikita/yii2-addresses/migrations

to the require section of your composer.json file.

Usage

Add line to backend config

'address' => [
            'class' => \ignatenkovnikita\addresses\Address::class,
            'controllerNamespace' => \ignatenkovnikita\addresses\Address::backendControllerNamespace(),
            'viewPath' => '@vendor/ignatenkovnikita/yii2-addresses/backend/views',
]

Add line to frontend config

'address' => [
            'class' => \ignatenkovnikita\addresses\Address::class,
            'controllerNamespace' => \ignatenkovnikita\addresses\Address::frontendControllerNamespace(),
]

Add in backend config in modules

'address' => [
            'class' => \ignatenkovnikita\addresses\Address::class,
            'controllerNamespace' => \ignatenkovnikita\addresses\Address::backendControllerNamespace(),
            'viewPath' => '@vendor/ignatenkovnikita/yii2-addresses/backend/views',
        ],

Add in frontend config in modules

'address' => [
            'class' => \ignatenkovnikita\addresses\Address::class,
            'controllerNamespace' => \ignatenkovnikita\addresses\Address::frontendControllerNamespace(),
        ],

Add component dadata

'dadata' => [
            'class' => \ignatenkovnikita\dadata\Client::className(),
            'token' => 'DADATA_TOKEN,
            'secret' => 'DADATA_SECRET',
            'query_path' => 'http://suggestions.dadata.ru',
        ],

// todo

  • refactoring
  • add dependence