Log Laravel requests and responses for statistical purposes and optionally aggregate by hours/days/months for minimal db requirements.
Version | Laravel | PHP |
---|---|---|
1.* | 10.* | 8.1.* | 8.2.* |
This package lets you:
- Check if a VAT number has a correct format
- Check if a VAT number is valid
- Lookup VAT details for a given VAT number
- Implement a VAT number validation rule
- Search for VAT details
You can install the package via composer:
composer require bilfeldt/laravel-vat-service
$driver = $manager->getDefaultDriver();
// In Denmark the format is 8-digits
$driver->getFormats('DK'); // ['########']
$driver->isValidFormat('DK', '12345678'); // bool
// This will do an API lookup.
// Will throw a VatServiceUnavilable if the service is down
$driver->isValid('DK', '12345678'); // bool
// Will throw a validation exception
$driver->validate('DK', 'INVALID');
// Get a DTO with info about the company
$driver->getInformation('DK', '12345678'); // VatInformation
// Find relevant companies based on company name or vat number
$driver->search('DK', 'Carlsberg'); // Collection<VatInformation>
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.