gietos / yii2-dadata
A Yii2 client for Dadata (https://dadata.ru/)
Installs: 28 120
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.3.0
- gietos/dadata: 1.*
- yiisoft/yii2: 2.*
This package is auto-updated.
Last update: 2024-10-22 02:33:01 UTC
README
A PHP library for the DaData.ru REST API
Installation
The suggested installation method is via composer:
composer require gietos/yii2-dadata
Usage
In config:
'components' => [ // ... 'dadata' => [ 'class' => '\gietos\yii\Dadata\Client', 'token' => '...', 'secret' => '...', ], ],
Example usage:
use gietos\yii\Dadata\Client; /** @var Client $client */ $client = \Yii::$app->dadata; $address = $client->cleanAddress('msk, tverskaya, 1'); echo 'Result: ' . $address->result . PHP_EOL;