Skip to content

bilfeldt/laravel-vat-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetch company VAT details in Laravel

bilfeldt/laravel-vat-service

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.*

Description

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

Installation

You can install the package via composer:

composer require bilfeldt/laravel-vat-service

Usage

$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>

Drivers

Facade

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Larave package to fetch companies vat details

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages