spatie/bpost-address-webservice
PHP wrapper for bpost’s Address Webservice. Create Address objects and validate Belgian addresses, receiving normalized fields plus warnings/errors/issue lists you can inspect and act on. Useful for checkout forms and address cleanup.
guzzlehttp/guzzle and symfony/options-resolver).errors/warnings, enabling seamless integration with Laravel’s validation pipelines (e.g., Form Requests).AddressValidator as a singleton in AppServiceProvider.validate() methods (e.g., StoreOrderRequest).creating/updating model events.Mockery or Laravel’s Http facade to stub Bpost API responses.failed job events.AddressValidator.Customer model).spatie/laravel-activitylog for failed validations).Cache::remember()) for frequent addresses.illuminate/support). Compatible with newer versions if no breaking changes.validated_addresses table..env config for API keys (e.g., BPOST_USERNAME, BPOST_PASSWORD).spatie/laravel-package-tools.AddressValidator facade for cleaner syntax.BpostAddressService class to encapsulate logic (e.g., caching, retries).HasValidatedAddress trait for Eloquent models.guzzlehttp/guzzle and symfony/options-resolver for updates.composer.json to avoid surprises.spatie/backoff).Cache::tags('bpost') for invalidation.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Bpost API downtime | Address validation fails | Fallback to manual review or cached data |
| Rate limiting (429 errors) | Checkout failures | Queue retries with backoff |
| Invalid API credentials | All validations fail | Monitor auth failures, alert on breach |
| Malformed Bpost responses | App crashes or silent failures | Validate response structure pre-processing |
| Database connection issues | Cached results stale | Implement stale-while-revalidate caching |
How can I help you explore Laravel packages today?