PHPackages                             kartinov/gdpr-toolkit - 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. kartinov/gdpr-toolkit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kartinov/gdpr-toolkit
=====================

GDPR toolkit for Laravel

v1.0.3(1mo ago)3695↑983.3%MITPHP ^8.2

Since Jun 21Compare

[ Source](https://github.com/Kartinov/gdpr-toolkit)[ Packagist](https://packagist.org/packages/kartinov/gdpr-toolkit)[ RSS](/packages/kartinov-gdpr-toolkit/feed)WikiDiscussions Synced 2w ago

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

GDPR Toolkit for Laravel
========================

[](#gdpr-toolkit-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/799f76f73e88fdc5b013d506224059108dcf122321727a3a0515e41d48304d5f/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696e6f762f676470722d746f6f6c6b69742f762f737461626c65)](https://packagist.org/packages/kartinov/gdpr-toolkit)[![Total Downloads](https://camo.githubusercontent.com/6d2dea2675a40557c8690f92d73b6b7e7aad04553b8b47a3de5d323db8693e4b/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696e6f762f676470722d746f6f6c6b69742f646f776e6c6f616473)](https://packagist.org/packages/kartinov/gdpr-toolkit)[![License](https://camo.githubusercontent.com/890bebfe8b5b1860fcf195ec47c0c123adc5da7f3ebfe1f258eaf085973a5221/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696e6f762f676470722d746f6f6c6b69742f6c6963656e7365)](https://packagist.org/packages/kartinov/gdpr-toolkit)[![GDPR Developer Guide](https://camo.githubusercontent.com/5e8620af3c33c509cce75b97296cf35a1ada38df5df6828b81def7f7bc79f3e7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f474450522d446576656c6f7065725f47756964652d626c756576696f6c6574)](docs/gdpr-basics.md)

A lightweight package to help Laravel developers address GDPR requirements by scanning your database for personally identifiable information and generating a draft Record of Processing Activities (RoPA).

> 📖 **New to GDPR?** Read our plain-English [GDPR Basics for Developers](docs/gdpr-basics.md) guide to learn how privacy-by-design impacts your migrations, logging, and database relationships.

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

[](#installation)

Require the package via Composer:

```
composer require kartinov/gdpr-toolkit
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Kartinov\GdprToolkit\GdprToolkitServiceProvider"
```

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

[](#configuration)

Open the published `config/gdpr-toolkit.php` and adjust the settings to match your application.

Usage
-----

[](#usage)

### Scanning

[](#scanning)

Run the scan to generate a draft RoPA:

```
php artisan gdpr:scan
```

This inspects your Eloquent models and database tables, detects personally identifiable information via column-name heuristics and foreign key relationships, and writes the result to:

```
storage/app/gdpr-ropa.json

```

#### Output format

[](#output-format)

```
{
    "generated_at": "2026-07-04T09:18:08+00:00",
    "total_tables_with_personal_data": 2,
    "data_map": {
        "User": {
            "fields": [
                "name",
                "email"
            ],
            "shipping_addresses": [
                "address",
                "city",
                "state",
                "zip",
                "country",
                "phone"
            ]
        }
    }
}
```

Each subject model maps to:

- `fields` — personal data columns on the subject's own table
- `{related_table}` — personal data columns on tables linked by foreign key

### Marking models with `HasPersonalData`

[](#marking-models-with-haspersonaldata)

Attach the `HasPersonalData` trait to any Eloquent model and declare its personal data fields:

```
use Kartinov\GdprToolkit\Traits\HasPersonalData;

class User extends Authenticatable
{
    use HasPersonalData;

    protected array $personalData = [
        'name',
        'email',
        'phone',
        'address',
    ];
}
```

The trait provides one method:

```
$user->exportPersonalData(); // Returns array of field => value
```

### Exporting personal data (Article 15 / 20)

[](#exporting-personal-data-article-15--20)

Generate a complete personal data export for a specific subject:

```
php artisan gdpr:export App\\Models\\User 1
php artisan gdpr:export App\\Models\\User john@example.com --output=storage/app/user_1_gdpr_export.json
```

- First argument: fully qualified model class (e.g. `App\Models\User`)
- Second argument: identifier — ID or email
- `--output` (optional): custom output path, defaults to `storage/app/gdpr-export.json`

The export includes the subject's own personal fields plus all related table records linked by foreign key.

Important Disclaimer
--------------------

[](#important-disclaimer)

This toolkit is a developer aid, not a legal service. The RoPA it generates is a technical draft — it does not guarantee GDPR compliance. Always have your records reviewed by a qualified legal professional before relying on them for regulatory purposes.

License
-------

[](#license)

This package is open-sourced software licensed under the MIT license.
See the [LICENSE](LICENSE.md) file for details.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance94

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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 ~3 days

Total

5

Last Release

33d ago

Major Versions

v0.1.2 → v1.0.02026-06-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/3427edaea1b174a0a12f81b08eec5c83482e9bbf08491dd2d76cf3433bb338e6?d=identicon)[Kartinov](/maintainers/Kartinov)

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kartinov-gdpr-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/kartinov-gdpr-toolkit/health.svg)](https://phpackages.com/packages/kartinov-gdpr-toolkit)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M352](/packages/psalm-plugin-laravel)[illuminate/pagination

The Illuminate Pagination package.

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

The Illuminate Pipeline package.

9350.2M303](/packages/illuminate-pipeline)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.4M231](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.8M396](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.7M141](/packages/illuminate-cookie)

PHPackages © 2026

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