PHPackages                             tpweb/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tpweb/vat

Abandoned → [madeitbelgium/vat](/?search=madeitbelgium%2Fvat)Library[Utility &amp; Helpers](/categories/utility)

tpweb/vat
=========

PHP VAT Library

1.4.1(6y ago)03031[1 PRs](https://github.com/TPWeb/Vat/pulls)LGPL-3.0-or-laterPHPPHP &gt;=5.6CI failing

Since Jun 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/TPWeb/Vat)[ Packagist](https://packagist.org/packages/tpweb/vat)[ Docs](http://www.tpweb.org/my-projects/php-vat/)[ RSS](/packages/tpweb-vat/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

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

[](#php-vat-library)

[![Build Status](https://camo.githubusercontent.com/e7b0ec7a30eb86413626acd01e026e64205c44935bc6499b732238987f856610/68747470733a2f2f7472617669732d63692e6f72672f54505765622f5661742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/TPWeb/Vat)[![Coverage Status](https://camo.githubusercontent.com/3480b82a8738611e8a1e7fe67aed8f887b084dfcd50660abb1aa5bd4afd927e7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f54505765622f7661742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/TPWeb/vat?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/db45e4016dc21ade721e2259530009884221a10169841b417f1fd93e28eea2dd/68747470733a2f2f706f7365722e707567782e6f72672f74707765622f7661742f762f737461626c652e737667)](https://packagist.org/packages/tpweb/vat)[![Latest Unstable Version](https://camo.githubusercontent.com/b097978d39b6c1997db856d5cf4575b130660355d137701047accaa6bc7e85a1/68747470733a2f2f706f7365722e707567782e6f72672f74707765622f7661742f762f756e737461626c652e737667)](https://packagist.org/packages/tpweb/vat)[![Total Downloads](https://camo.githubusercontent.com/658291e9eb8a8b6d465e1c57877efb0c29159e69249e2ad17ebb82b6daff45cb/68747470733a2f2f706f7365722e707567782e6f72672f74707765622f7661742f642f746f74616c2e737667)](https://packagist.org/packages/tpweb/vat)[![License](https://camo.githubusercontent.com/869f3965ebca00df100d8561caa77ecb455d011b379b04c3284523603450d79d/68747470733a2f2f706f7365722e707567782e6f72672f74707765622f7661742f6c6963656e73652e737667)](https://packagist.org/packages/tpweb/vat)

\#Installation

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

```
"tpweb/vat": "^1.3"
```

Or

```
composer require tpweb/vat
```

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

```
TPWeb\Vat\VatServiceProvider::class,
```

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

```
'Vat' => TPWeb\Vat\VatFacade::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
```

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 61% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~123 days

Recently: every ~19 days

Total

12

Last Release

2357d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6589788?v=4)[TPWeb](/maintainers/tpweb)[@TPWeb](https://github.com/TPWeb)

---

Top Contributors

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

---

Tags

ogmvatvat validation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/pagination

The Illuminate Pagination package.

12234.6M1.1k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9350.2M310](/packages/illuminate-pipeline)[illuminate/cookie

The Illuminate Cookie package.

224.7M145](/packages/illuminate-cookie)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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