Download the PHP package imjonos/laravel-dadata-api without Composer
On this page you can find all versions of the php package imjonos/laravel-dadata-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imjonos/laravel-dadata-api
More information about imjonos/laravel-dadata-api
Files in imjonos/laravel-dadata-api
Package laravel-dadata-api
Short Description Laravel Dadata API
License MIT
Homepage https://github.com/imjonos/laravel-dadata-api
Informations about the package laravel-dadata-api
Laravel Dadata API
Laravel package for working with Dadata API - address suggestions, data cleaning, company and bank information lookup.
Features
- Address suggestions with FIAS support
- Address cleaning and standardization
- Phone number cleaning
- Company search by INN
- Bank search by BIC/SWIFT
- Delivery point IDs (CDEK, Boxberry, DPD)
- Full DTO support for type-safe data handling
Requirements
- PHP 8.3+
- Laravel 12.0+
- imjonos/laravel-base-dto package
- Dadata account (register)
Installation
Configuration
Publish the configuration file:
Add your Dadata credentials to .env:
You can find your credentials in your Dadata profile.
Usage
Address Suggestions
Company Search
Bank Search
Address Cleaning
Phone Cleaning
Delivery Points
Available Methods
Address-like autocomplete methods return AddressSuggestionCollection, and company search returns CompanySuggestionCollection:
| Method | Parameters | Description |
|---|---|---|
suggestCity |
$query, $countryCodeISO, $count |
City suggestions |
suggestStreet |
$query, $fiasId, $count |
Street suggestions |
suggestHouse |
$query, $streetFiasId, $count |
House suggestions |
suggestCountry |
$query, $count |
Country suggestions |
suggestAddress |
$query, $fiasId? |
General address search |
suggestBank |
$query |
Bank search |
suggestCompany |
$inn |
Company by INN |
suggestDeliveryId |
$kladrId |
Delivery point IDs |
suggestAddressById |
$fiasId |
Address by FIAS ID |
Clean methods return DTO objects:
| Method | Parameters | Returns |
|---|---|---|
cleanAddress |
$address |
AddressDTO |
cleanPhone |
$phone |
PhoneDTO |
Autocomplete DTOs
AddressDTO
Represents cleaned address with all details:
PhoneDTO
Represents cleaned phone number:
AddressSuggestionDTO
Represents one address autocomplete item. All fields are exposed directly on the DTO:
CompanySuggestionDTO
Represents one company autocomplete item. All fields are exposed directly on the DTO:
AddressSuggestionCollection
Collection of address-like suggestions with utility methods:
CompanySuggestionCollection
Collection of company suggestions with the same utility methods:
License
MIT License. See license.md for more information.