Download the PHP package omisai/laravel-vies-rest without Composer
On this page you can find all versions of the php package omisai/laravel-vies-rest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-vies-rest
Laravel VIES REST
A Laravel adapter for the VIES REST API package, utilizing Laravel's HTTP client.
Features
- Type-safe: PHP 8.1+ type declarations and modern enum support
- Clean architecture: DTOs, validation, and HTTP adapters
- Production + test modes: Switch services via
ViesConfig - Error handling: Structured exceptions for validation and REST errors
- Approximate matching: Trader detail matching support
- All EU countries: EU member states plus Northern Ireland
- Tested: Pest-based test suite
Requirements
- PHP 8.1 or higher
- omisai/vies-rest (base package)
- illuminate/http v10 or higher (Laravel HTTP client)
Installation
Install the package via Composer:
Quick Start
This package requires the base omisai/vies-rest package.
The Omisai\LaravelViesRest\ViesRestServiceProvider service provider automatically registers the Laravel HTTP client adapter. The Omisai\ViesRest\ViesClient will use Laravel's HTTP client instead of direct Guzzle.
Via Dependency Injection
Via Service Container Resolution
Using the Test Service
Configuration
Environment Configuration
HTTP Client Options
API Reference
ViesClient
checkVat(string $countryCode, string $vatNumber): CheckVatResponse
Validates a VAT number and returns basic information.
checkVatApprox(CheckVatRequest $request): CheckVatResponse
Performs approximate validation with trader details.
checkStatus(): StatusInformationResponse
Returns availability info for member states.
Data Transfer Objects (DTOs)
CheckVatRequest
CheckVatResponse
Supported Countries
Error Handling
Validation Errors
REST API Errors
Advanced Usage
Custom HTTP Client Factory
Custom Validation
Batch Processing
Testing
Run the test suite using Pest:
Performance Considerations
- The VIES service has rate limits - avoid excessive requests
- REST calls are synchronous and may take 1-5 seconds
- Consider caching valid VAT numbers to reduce API calls
- Use the test service for development to avoid affecting production quotas
Limitations
- Requires internet connection to VIES service
- Service may be unavailable during maintenance windows
- Rate limiting applies to prevent abuse
- Some countries may have additional validation rules
Contributing
Please see CONTRIBUTING.md for details on how to contribute to this project.
Security
Please see SECURITY.md for details on reporting security vulnerabilities.
License
This package is open-sourced software licensed under the MIT license.
Sponsoring
If you find this package useful, please consider sponsoring the development: Sponsoring on GitHub
Your support helps us maintain and improve this open-source project!
Official VIES Documentation
All versions of laravel-vies-rest with dependencies
omisai/vies-rest Version ^1.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0