PHPackages                             robertogallea/laravel-greenpass - 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. robertogallea/laravel-greenpass

ActiveLibrary

robertogallea/laravel-greenpass
===============================

European green-pass decoding and validation for php/laravel

0.2.2(4y ago)81675PHPPHP ^7.3|^8.0

Since Oct 12Pushed 4y ago2 watchersCompare

[ Source](https://github.com/robertogallea/laravel-greenpass)[ Packagist](https://packagist.org/packages/robertogallea/laravel-greenpass)[ RSS](/packages/robertogallea-laravel-greenpass/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (5)Used By (0)

[![Laravel Green Pass](https://camo.githubusercontent.com/536316a7d898b32681a7b066ec0e253260cc2a9b6635848d8965657da3e62135/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230477265656e253230506173732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d726f626572746f67616c6c65612532466c61726176656c2d677265656e70617373267061747465726e3d636861726c696542726f776e267374796c653d7374796c655f31266465736372697074696f6e3d477265656e2b506173732b76616c69646174696f6e2b616e642b6465636f64696e672b69732b612b627265657a65266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d6964656e74696669636174696f6e267769647468733d32303026686569676874733d6175746f)](https://camo.githubusercontent.com/536316a7d898b32681a7b066ec0e253260cc2a9b6635848d8965657da3e62135/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230477265656e253230506173732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d726f626572746f67616c6c65612532466c61726176656c2d677265656e70617373267061747465726e3d636861726c696542726f776e267374796c653d7374796c655f31266465736372697074696f6e3d477265656e2b506173732b76616c69646174696f6e2b616e642b6465636f64696e672b69732b612b627265657a65266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d6964656e74696669636174696f6e267769647468733d32303026686569676874733d6175746f)

laravel-greenpass
=================

[](#laravel-greenpass)

[![Author](https://camo.githubusercontent.com/bd84f242372028b300dda5beb4de8d4730d4df44685c8554a873e716659feb1c/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d617574686f72266d6573736167653d726f6267616c6c656126636f6c6f723d353041424631266c6f676f3d74776974746572267374796c653d666c61742d737175617265)](https://twitter.com/robgallea)[![GitHub release (latest SemVer)](https://camo.githubusercontent.com/91c269ed4f852e2f289cbaa145502be951f6f795ab823246634bb3baf3af56cd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f726f626572746f67616c6c65612f6c61726176656c2d677265656e70617373)](https://github.com/robertogallea/laravel-greenpass)[![Laravel >=6.0](https://camo.githubusercontent.com/0c9c95ea41100ab5978a5e17560b8b0463e09bb57b41eeab5892d082eea53bff/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d6c61726176656c266d6573736167653d254532253839254135362e3026636f6c6f723d666632643230266c6f676f3d6c61726176656c267374796c653d666c61742d737175617265)](https://laravel.com)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PSR2 Conformance](https://camo.githubusercontent.com/77efe502eb1d74ef9a94f0d2c15b5ea6e5c0689cff4f7e5c65acb097fbd5aa8b/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137373133303538322f736869656c64)](https://styleci.io/repos/17713058s2/)[![Sponsor me!](https://camo.githubusercontent.com/78d8f37e45135156aa667c76aa28893949f0d59ea84c527e854792166f2a06eb/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d476974487562266c696e6b3d68747470733a2f2f6769746875622e636f6d2f73706f6e736f72732f726f626572746f67616c6c6561)](https://github.com/sponsors/robertogallea)[![Packagist Downloads](https://camo.githubusercontent.com/8d43cfcbb98943703ce3ea1729b59cb16f1ca7d1ac1368093df973e0c11b1ed9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f626572746f67616c6c65612f6c61726176656c2d677265656e70617373)](https://packagist.org/packages/robertogallea/laravel-greenpass)

laravel-greenpass is a package for the management of the European `Green Pass` (i.e. covid certification). The package allows easy validation and decoding of the GreenPass. It is also suited for Laravel since it provides a convenient custom validator for request validation.

- [Installation](#installation)
- [Configuration](#configuration)
- [Validation](#validation)
- [Utility GreenPassDecoder class](#utility-greenpassdecoder-class)

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

[](#installation)

Run the following command to install the latest applicable version of the package:

```
composer require robertogallea/laravel-greenpass
```

### Laravel

[](#laravel)

In your app config, add the Service Provider to the `$providers` array *(only for Laravel 5.4 or below)*:

```
'providers' => [
   ...
   robertogallea\LaravelGreenPass\GreenPassServiceProvider::class,
],
```

### Lumen

[](#lumen)

In `bootstrap/app.php`, register the Service Provider

```
$app->register(robertogallea\LaravelGreenPass\GreenPassServiceProvider::class);
```

Configuration
-------------

[](#configuration)

By default, the underlying validation package saves the validation certificates inside `storage/app/public/green_pass_cache`. If you want to change this folder, publish the config file with the command

```
php artisan vendor:publish --provider="robertogallea\LaravelGreenPass\GreenPassServiceProvider" --tag="config"

```

and edit the `certificate-storage-path` key inside the `config/green-pass.php` file.

**Make sure the chosen folder has write access!**

Validation
----------

[](#validation)

To validate the **formal** correctness of a green pass, use the `greenpass` and `greenpass_file` keyword in your validation rules array. Please note that in this way you don't check that the green pass is actually valid (i.e. not expired or revoked).

```
    public function rules()
    {
        return [
            'greenpass_string' => 'greenpass',

            //...
        ];
    }
```

```
    public function rules()
    {
        return [
            'greenpass_uploaded_file' => 'greenpass_file',

            //...
        ];
    }
```

To perform **strict** validation (i.e. check actual validity) you can add the `active` parameter to the validator rule:

```
    public function rules()
    {
        return [
            'greenpass_string' => 'greenpass:active',

            //...
        ];
    }
```

```
    public function rules()
    {
        return [
            'greenpass_uploaded_file' => 'greenpass_file:active',

            //...
        ];
    }
```

Utility GreenPassDecoder class
------------------------------

[](#utility-greenpassdecoder-class)

A green pass can be read using the `GreenPassDecoder` service:

```
use robertogallea\LaravelGreenPass\GreenPassDecoder;

...

$greenpass = new GreenPassDecoder();

$result = $greenpass->decode('HC1:...');
var_dump($result);

// or

$result = $greenpass->decodeFile('/path/to/file');
var_dump($result);
```

You can also use the `GreenPass` facade:

```
use robertogallea\LaravelGreenPass\GreenPassDecoder;

...
$result = \GreenPass::decode('HC1:...');
var_dump($result);

// or

$result = \GreenPass::decodeFile('/path/to/file');
var_dump($result);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~21 days

Total

4

Last Release

1609d ago

PHP version history (2 changes)0.1.0PHP ^8.0

0.2.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/818f547bcf73a82393d9014c85c90c83d760102a8d4dfe806353afb83848a901?d=identicon)[robertogallea](/maintainers/robertogallea)

---

Top Contributors

[![robertogallea](https://avatars.githubusercontent.com/u/19411470?v=4)](https://github.com/robertogallea "robertogallea (20 commits)")[![Giacomo92](https://avatars.githubusercontent.com/u/11694429?v=4)](https://github.com/Giacomo92 "Giacomo92 (3 commits)")[![albertovincenzi](https://avatars.githubusercontent.com/u/9381203?v=4)](https://github.com/albertovincenzi "albertovincenzi (1 commits)")[![satboy78](https://avatars.githubusercontent.com/u/3984438?v=4)](https://github.com/satboy78 "satboy78 (1 commits)")

---

Tags

hacktoberfesthacktoberfest2021

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/robertogallea-laravel-greenpass/health.svg)

```
[![Health](https://phpackages.com/badges/robertogallea-laravel-greenpass/health.svg)](https://phpackages.com/packages/robertogallea-laravel-greenpass)
```

###  Alternatives

[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)

PHPackages © 2026

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