Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Yandex Provider

Yandex Provider Laravel Package

geocoder-php/yandex-provider

Yandex provider for the Geocoder PHP library. Adds Yandex Geocoder and reverse geocoding support, returning normalized address and coordinate data via the standard Geocoder interfaces. Suitable for Laravel or standalone PHP projects.

View on GitHub
Deep Wiki
Context7

[READ ONLY] Provider for Yandex

Frequently asked questions about Yandex Provider
How do I install the Yandex provider for Laravel geocoding?
Run `composer require geocoder-php/yandex-provider` to install. No additional Laravel-specific setup is needed beyond binding the provider to the service container. Follow the [Geocoder PHP docs](https://geocoder-php.org/) for integration with Laravel’s HTTP client or facades.
Does this package support Laravel’s queue system for async geocoding?
Yes. Use Laravel’s queue system to offload geocoding jobs (e.g., `geocode:address`). The provider works with any PSR-18 HTTP client, so you can integrate it with Laravel’s `queue:work` or Guzzle middleware for retries.
What Laravel versions are compatible with geocoder-php/yandex-provider?
The package supports Laravel 8.x, 9.x, and 10.x. It depends on `geocoder-php/core`, which has no Laravel-specific dependencies. Tested with PHP 8.0+ and follows PSR standards for broad compatibility.
How do I handle Yandex API rate limits in Laravel?
Use Laravel’s caching layer (e.g., Redis) to store geocoding results with a TTL (e.g., 5 minutes for static addresses). Implement exponential backoff in your HTTP client middleware or use Guzzle’s retry logic for failed requests.
Can I use this provider alongside Google Maps or OpenStreetMap in Laravel?
Absolutely. The package is part of the `geocoder-php` ecosystem, which supports multi-provider fallback. Configure a primary provider (e.g., Yandex) and secondary providers (e.g., Google) in your Laravel service container for high availability.
How do I configure the Yandex API key in Laravel?
Store your Yandex API key in `.env` (e.g., `YANDEX_GEOCODE_API_KEY`). Bind the provider in Laravel’s `AppServiceProvider` using the key from config, like this: `$app->bind(Yandex::class, fn() => new Yandex($httpClient, null, config('services.yandex.api_key')));`.
What languages does the Yandex provider support for geocoding?
The provider supports Russian (`ru-RU`), Ukrainian (`uk-UA`), Belarusian (`be-BY`), English (`en-US`/`en-BR`), and Turkish (`tr-TR`). Set the locale via the `GeocodeQuery` or `ReverseQuery` constructor for accurate results.
Is this package suitable for production use in high-traffic Laravel apps?
Yes, but monitor Yandex’s API usage limits and costs. For high volume, implement batch processing, caching, and fallback providers. Use Laravel’s queue system to distribute geocoding tasks and avoid timeouts.
How do I test geocoding functionality in Laravel unit tests?
Mock the `Yandex` provider using Laravel’s `MockHttpClient` or Guzzle’s `MockHandler`. Test edge cases like invalid addresses, coordinates, and API errors. Example: `$mock = new MockHandler([new Response(200, [], json_encode(['results' => [...]]))]);`
What are the alternatives to geocoder-php/yandex-provider for Laravel?
Alternatives include `spatie/laravel-geocoder` (Laravel-specific wrapper), `mapbox/geocoder-php`, or `openstreetmap/geocoder-php`. Choose based on region (Yandex excels in CIS/Europe), cost, and API features. Yandex is ideal for Russian/Belarusian addresses.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky