PHPackages                             madeitbelgium/vat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. madeitbelgium/vat

ActiveLibrary

madeitbelgium/vat
=================

PHP VAT Library

1.7.0(4y ago)0442LGPL-3.0-or-laterPHPPHP &gt;=7.2

Since Jun 17Pushed 4y agoCompare

[ Source](https://github.com/madeITBelgium/Vat)[ Packagist](https://packagist.org/packages/madeitbelgium/vat)[ Docs](http://www.madeit.be/)[ RSS](/packages/madeitbelgium-vat/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (7)Dependencies (5)Versions (21)Used By (0)

PHP VAT Library
===============

[](#php-vat-library)

[![Build Status](https://camo.githubusercontent.com/9a442d888956f84f965ebcbad96632503cb5561513f4eac4a0578ddd18eacd6e/68747470733a2f2f7472617669732d63692e6f72672f4d616465495442656c6769756d2f5661742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/MadeITBelgium/Vat)[![Coverage Status](https://camo.githubusercontent.com/debd07fe97ad23155949442598db2fcd8403ca613985dc842ce8208e4d0ecb91/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4d616465495442656c6769756d2f7661742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/MadeITBelgium/vat?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/2ec706bb26e27cbba24c0734a2e4c0dc7b25ce815457d45bb22b92198be4fb1f/68747470733a2f2f706f7365722e707567782e6f72672f6d616465697462656c6769756d2f7661742f762f737461626c652e737667)](https://packagist.org/packages/madeitbelgium/vat)[![Latest Unstable Version](https://camo.githubusercontent.com/5140b0b09112553452e46ce1c22e970c92725fb1842b267b474d5f1283f2e6e1/68747470733a2f2f706f7365722e707567782e6f72672f6d616465697462656c6769756d2f7661742f762f756e737461626c652e737667)](https://packagist.org/packages/madeitbelgium/vat)[![Total Downloads](https://camo.githubusercontent.com/53113f43687f97dab66632052e9e333efd3a6354b7c431e95687362a65083f25/68747470733a2f2f706f7365722e707567782e6f72672f6d616465697462656c6769756d2f7661742f642f746f74616c2e737667)](https://packagist.org/packages/madeitbelgium/vat)[![License](https://camo.githubusercontent.com/d1ade9ce4ce07141634df0be22e700326b6e1f673836ceb830e10ce7fd220ba9/68747470733a2f2f706f7365722e707567782e6f72672f6d616465697462656c6769756d2f7661742f6c6963656e73652e737667)](https://packagist.org/packages/madeitbelgium/vat)

Installation
============

[](#installation)

Require this package in your `composer.json` and update composer.

```
"madeitbelgium/vat": "^1.6"
```

Or

```
composer require madeitbelgium/vat
```

After updating composer, add the ServiceProvider to the providers array in `config/app.php`

```
MadeITBelgium\Vat\ServiceProvider\Vat::class,
```

You can use the facade for shorter code. Add this to your aliases:

```
'Vat' => MadeITBelgium\Vat\Facade\Vat::class,
```

Documentation
=============

[](#documentation)

Validation
----------

[](#validation)

```
$vatnr = "BE....";
$vat = new Vat($vatnr);
if($vat->isVatValid()) {
    echo "VAT is valid!";
}
```

### laravel validation

[](#laravel-validation)

```
$this->validate($request, ['vatnumber' => 'vat']);
```

When the service is down a ServiceUnavailableException exception is thrown. To allow the validation to succeed when the service is down you can add an option with the default value when to the validation.

```
$this->validate($request, ['vatnumber' => 'vat:true']);
```

Format (Not working)
--------------------

[](#format-not-working)

```
$vatnr = "BE....";
$vat = new Vat($vatnr);
echo $vat->vatFormat();
```

Genearte OGM
------------

[](#genearte-ogm)

```
$generator = new Vat;
echo $generator->generateOGM(1); //Output: 000000000101
echo $generator->generateOGM(1, "111"); //Output: 111000000195
echo $generator->generateOGM(2, "333", true); //Output: 333/0000/00290
```

Parse data
----------

[](#parse-data)

```
use MadeITBelgium\Vat\Facade\Vat;
$data = Vat::setVat($vatNr)->parse();
dd($data);

/*
countryCode: "",
valid: true,
name: "",
zipcode: "",
city: "",
street: "",
address: "",
*/
```

The complete documentation can be found at:

Support
=======

[](#support)

Support github or mail:

Contributing
============

[](#contributing)

Please try to follow the psr-2 coding style guide.

License
=======

[](#license)

This package is licensed under LGPL. You are free to use it in personal and commercial projects. The code can be forked and modified, but the original copyright author should always be included!

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 51.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~116 days

Recently: every ~145 days

Total

19

Last Release

1521d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6

1.6.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3d01bc996f789c6362a12e51af7b19ad39ca580f77dc6ef4ff1754888391508?d=identicon)[MadeITBelgium](/maintainers/MadeITBelgium)

---

Top Contributors

[![TPWeb](https://avatars.githubusercontent.com/u/6589788?v=4)](https://github.com/TPWeb "TPWeb (37 commits)")[![madeITBelgium](https://avatars.githubusercontent.com/u/20304892?v=4)](https://github.com/madeITBelgium "madeITBelgium (35 commits)")

---

Tags

laravelogmvatvat validation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/madeitbelgium-vat/health.svg)

```
[![Health](https://phpackages.com/badges/madeitbelgium-vat/health.svg)](https://phpackages.com/packages/madeitbelgium-vat)
```

###  Alternatives

[danielebarbaro/laravel-vat-eu-validator

A simple package that validates EU VAT numbers against the central ec.europa.eu database

37369.4k](/packages/danielebarbaro-laravel-vat-eu-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
