PHPackages                             nsu-soft/yii-dadata - 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. [Caching](/categories/caching)
4. /
5. nsu-soft/yii-dadata

ActiveLibrary[Caching](/categories/caching)

nsu-soft/yii-dadata
===================

DaData module for Yii 2 Framework

0.6(9mo ago)1382[4 issues](https://github.com/nsu-soft/yii-dadata/issues)BSD-3-ClausePHPPHP &gt;=7.2

Since Sep 30Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/nsu-soft/yii-dadata)[ Packagist](https://packagist.org/packages/nsu-soft/yii-dadata)[ RSS](/packages/nsu-soft-yii-dadata/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (3)Versions (20)Used By (0)

DaData module for Yii framework
===============================

[](#dadata-module-for-yii-framework)

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

[](#installation)

If you don't have [Composer](https://getcomposer.org/), you may install it by following instructions at [getcomposer.org](https://getcomposer.org/doc/00-intro.md).

Install this library using the following command:

```
composer require nsu-soft/yii-dadata
```

Configuration
-------------

[](#configuration)

Add the following lines to your configuration file:

```
'modules' => [
    'dadata' => [
        'class' => 'nsusoft\dadata\Module',
        'token' => 'enter-your-dadata-token',
        'secret' => 'enter-your-dadata-secret',
        'cachePriority' => [DbHandler::class],
    ],
],
```

[Read more](https://www.yiiframework.com/doc/guide/2.0/en/structure-modules#using-modules) about modules configuration in Yii2.

Migrations
----------

[](#migrations)

Apply migrations, if you want to save responses from DaData to your local database:

```
yii migrate --migrationPath=@vendor/nsu-soft/yii-dadata/src/migrations
```

Usage
-----

[](#usage)

Clean address:

```
