1. Go to this page and download the library: Download coolycow/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/ */
coolycow / laravel-dadata example snippets
use Coolycow\Dadata\Facades\DadataSuggest;
// Всегда возвращает list<array> (пустой список, если совпадений нет)
$result = DadataSuggest::suggest('address', ['query' => 'Москва', 'count' => 2]);
$party = DadataSuggest::partyById('7707083893', ['branch_type' => 'MAIN']);
use Coolycow\Dadata\ClientClean;
use Coolycow\Dadata\ClientSuggest;
public function __construct(
private ClientSuggest $suggest,
private ClientClean $clean,
) {}