jiexaspb/laravel-dadata
Laravel SDK для работы с API DaData.ru: подсказки и стандартизация адресов и данных. Поддержка PHP 7.3–8.1, Laravel 7–9, настройка через .env (token/secret/timeout), публикация конфигурации и удобная интеграция через сервис-провайдер.
suggest() for addresses, clean() for phone numbers) rather than raw API wrappers, which accelerates implementation of data enrichment workflows.movemoveapp/laravel-dadata)..env (e.g., DADATA_API_KEY).DaDataResponse), easing integration with Laravel’s Form Requests, Validation, or Model observers.retry helper) or fallback caching for non-critical suggestions.DaData::suggest() with mock responses).DaData::clean($data)) without strict return types. Risk: Runtime errors if API responses change. Mitigation: Add PHPDoc return types or use return_type in Laravel 8+.suggest() after form submission).clean, suggest, findById) or just a subset?result.value to your model fields)?dadata_valid rule).
use MoveMoveIo\DaData\Facades\DaData;
$validated = DaData::clean($request->address);
saving/updating:
public function saving(User $user) {
$user->address = DaData::clean($user->address);
}
DaDataJob).DaData::suggest('ул. Ленина')).result.value → address field).Rule::custom('dadata_valid')).throttle middleware for API routes).| Step | Task | Dependencies | Owner |
|---|---|---|---|
| 1 | Install package + config API key | Composer, .env |
DevOps/Backend |
| 2 | Test basic endpoints (e.g., suggest, clean) |
DaData API access | QA/Backend |
| 3 | Integrate with form validation | Laravel Validation | Frontend/Backend |
| 4 | Add model observers for auto-cleaning | Eloquent models | Backend |
| 5 | Implement caching (Redis) for frequent queries | Redis setup | DevOps |
| 6 | Set up error monitoring (Sentry) | Sentry config | DevOps |
| 7 | Optimize rate limiting (e.g., queue delays) | Laravel Queues | Backend |
.env..env periodically.401 Unauthorized, 429 Rate Limit).suggest() vs. clean()).How can I help you explore Laravel packages today?