PHP code example of gietos / yii2-dadata
1. Go to this page and download the library: Download gietos/yii2-dadata library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gietos / yii2-dadata example snippets
php
'components' => [
// ...
'dadata' => [
'class' => '\gietos\yii\Dadata\Client',
'token' => '...',
'secret' => '...',
],
],
php
use gietos\yii\Dadata\Client;
/** @var Client $client */
$client = \Yii::$app->dadata;
$address = $client->cleanAddress('msk, tverskaya, 1');
echo 'Result: ' . $address->result . PHP_EOL;