PHPackages                             belghiti/laravel-rest-vies - 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. [API Development](/categories/api)
4. /
5. belghiti/laravel-rest-vies

ActiveLibrary[API Development](/categories/api)

belghiti/laravel-rest-vies
==========================

Laravel 12 integration for belghiti/vies-client (Belghiti\\Vies).

v0.1.2(4mo ago)00MITPHPPHP &gt;=8.2CI passing

Since Feb 23Pushed 4mo agoCompare

[ Source](https://github.com/belghiti/laravel-rest-vies)[ Packagist](https://packagist.org/packages/belghiti/laravel-rest-vies)[ RSS](/packages/belghiti-laravel-rest-vies/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (6)Versions (3)Used By (0)

belghiti/laravel-rest-vies
==========================

[](#belghitilaravel-rest-vies)

[![CI](https://github.com/belghiti/laravel-rest-vies/actions/workflows/ci.yml/badge.svg)](https://github.com/belghiti/laravel-rest-vies/actions)[![Packagist](https://camo.githubusercontent.com/e7809f734b2241ccfb60e9efa0eac199b8eb7e17fd10ce83c48592e4907a9e4c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656c67686974692f6c61726176656c2d726573742d766965732e737667)](https://packagist.org/packages/belghiti/laravel-rest-vies)[![Downloads](https://camo.githubusercontent.com/7e4feab6edbbe2046b445f7e9f277c5794e00cccb0af634b4d53f9fcb55eb3a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62656c67686974692f6c61726176656c2d726573742d766965732e737667)](https://packagist.org/packages/belghiti/laravel-rest-vies)

Laravel 12 integration for **VIES**: Service Provider + Facade + Validation Rule + Cache decorator. It wires the core `belghiti/vies-client` with retry and Laravel Cache.

---

Requirements
------------

[](#requirements)

- **Laravel 12.x**
- PHP **8.2 – 8.5**

Installation
------------

[](#installation)

```
composer require belghiti/laravel-rest-vies
php artisan vendor:publish --tag=vies-config
```

**config/vies.php**

```
return [
    'base_uri'  => env('VIES_BASE_URI', 'https://ec.europa.eu/taxation_customs/vies/rest-api'),
    'cache_ttl' => (int) env('VIES_CACHE_TTL', 3600),
];
```

**.env**

```
VIES_BASE_URI=https://ec.europa.eu/taxation_customs/vies/rest-api
VIES_CACHE_TTL=3600
```

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use Vies; // Belghiti\Vies\Laravel\ViesFacade alias
use Belghiti\Vies\Dto\CheckVatRequest;

$res = Vies::checkVatNumber(new CheckVatRequest('FR', '40303265045'));
if ($res->valid) {
    // ...
}
```

### Dependency Injection

[](#dependency-injection)

```
use Belghiti\Vies\Client\ViesClientInterface;
use Belghiti\Vies\Dto\CheckVatRequest;

public function __construct(private ViesClientInterface $vies) {}

public function __invoke()
{
    $status = $vies->checkStatus();
    // ...
}
```

### Validation Rule

[](#validation-rule)

```
use Belghiti\Vies\Laravel\Rules\ValidVatInVies;
use Illuminate\Support\Facades\Validator;

$validator = Validator::make(
  ['vat' => '40303265045'],
  ['vat' => [new ValidVatInVies(app(\Belghiti\Vies\Client\ViesClientInterface::class), 'FR')]]
);
```

Notes
-----

[](#notes)

- `CheckVatRequest` covers the contract fields (`countryCode`, `vatNumber`, optional trader info)
- The package caches `checkVatNumber()` responses using your configured Laravel Cache store (TTL from config)

Quality
-------

[](#quality)

```
composer lint   # PSR-12
composer stan   # PHPStan level max
vendor/bin/pest -d
```

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance76

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45d9657097644f4fffbd69fb767b90215abe1f65654806e31fb246089422a6f1?d=identicon)[belghiti](/maintainers/belghiti)

---

Top Contributors

[![belghiti](https://avatars.githubusercontent.com/u/5228095?v=4)](https://github.com/belghiti "belghiti (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/belghiti-laravel-rest-vies/health.svg)

```
[![Health](https://phpackages.com/badges/belghiti-laravel-rest-vies/health.svg)](https://phpackages.com/packages/belghiti-laravel-rest-vies)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)

PHPackages © 2026

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