Search by

jeffersongoncalves / laravel-lgpd-records

jeffersongoncalves

LGPD records of processing activities (ROPA) for Laravel: purposes, legal bases, recipients and international transfers, joined with the personal data inventory, plus the data protection officer's public contact.

1.0.0 2026-11-16 23:18 UTC

This package is auto-updated.

Last update: 2026-11-16 23:18:52 UTC


README

Laravel LGPD Records

Latest Version on Packagist Tests Total Downloads

The Brazilian General Data Protection Law (LGPD, Lei 13.709/2018) asks controllers to keep records of their processing operations (art. 37, the ROPA). It also asks them to publish the identity and contact of their data protection officer, the encarregado (art. 41). This package stores your processing activities and joins each one with the columns you declared in laravel-lgpd. Your records follow your code.

This package gives you tooling. It does not make you compliant on its own. Your records need legal review.

Installation

composer require jeffersongoncalves/laravel-lgpd-records
php artisan vendor:publish --tag="lgpd-records-migrations"
php artisan migrate
LGPD_CONTROLLER_NAME="Acme Ltda"
LGPD_CONTROLLER_DOCUMENT="00.000.000/0001-00"
LGPD_DPO_NAME="Ana Souza"
LGPD_DPO_EMAIL=dpo@acme.com.br

Processing activities

use JeffersonGoncalves\Lgpd\Enums\LegalBasis;
use JeffersonGoncalves\LgpdRecords\Models\ProcessingActivity;

ProcessingActivity::create([
    'name' => 'Billing',
    'purpose' => 'Issue invoices and collect payments',
    'legal_basis' => LegalBasis::Contract,
    'data_subjects' => ['customers'],
    'models' => [Customer::class],                     // its #[PersonalData] columns join the record
    'data_categories' => ['payment history'],          // anything not declared on a model
    'recipients' => [['name' => 'Stripe', 'role' => 'processor', 'country' => 'US']],
    'international_transfers' => [['country' => 'US', 'mechanism' => 'standard_clauses']],
    'retention' => '5 years after the end of the contract',
    'security_measures' => 'Encryption at rest, role-based access, audit log',
]);
  • role: processor (operador), controller (shared controller) or public_authority.
  • mechanism: the legal ground for the transfer (art. 33), such as adequacy, standard_clauses, binding_corporate_rules or specific_consent.

Export

php artisan lgpd:ropa          # one row per activity
php artisan lgpd:ropa --json   # controller, DPO and every activity, ready to hand to the ANPD
LgpdRecords::export();   // the same, as an array

The command warns you when the DPO contact is missing.

Data protection officer

Publish the encarregado's identity and contact on your website (art. 41, §1):

<x-lgpd-records::dpo label="Encarregado" class="text-sm" />

It renders the name, a mailto: link and a tel: link, and renders nothing until a DPO is configured.

Testing

composer test

Changelog

See CHANGELOG.

License

The MIT License (MIT). See License File.