A PHP library for the DaData.ru REST API
The suggested installation method is via composer:
composer require gietos/yii2-dadata
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;