PHP code example of alexbklnv / laravel-dadata

1. Go to this page and download the library: Download alexbklnv/laravel-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/ */

    

alexbklnv / laravel-dadata example snippets


    'token' => env('DADATA_TOKEN', ''),
    'secret' => env('DADATA_SECRET', ''),

use AlexBklnv\DaData\Facades\DaDataAddress;

$result = DaDataAddress::cleanAddress('мск сухонска 11/-89');

$result = DaDataAddress->suggestAddress('москва хабар');

$result = DaDataAddress::geocodeAddress('москва сухонская 11');

$result = DaDataAddress::geolocate('55.87', '37.653');

$result = DaDataAddress::iplocate('46.226.227.20');

$result = DaDataAddress::findByCode('9120b43f-2fae-4838-a144-85e43c2bfb29');

$result = DaDataAddress::findByCadastre('9120b43f-2fae-4838-a144-85e43c2bfb29');

$result = DaDataAddress::findPostUnit('дежнева 2а');

$result = DaDataAddress::suggestCountry('та');

use AlexBklnv\DaData\Facades\DaDataProfile;

$result = DaDataProfile::getBalance();

$result = DaDataProfile::getStat();

$result = DaDataProfile::getStat('2019-11-01');
$result = DaDataProfile::getStat(new DateTime());
$result = DaDataProfile::getStat(\Carbon\Carbon::create('2014', '12', '12'));

$result = DaDataProfile::getRelevance();
bash
php artisan vendor:publish --provider="AlexBklnv\DaData\DaDataServiceProvider"