Download the PHP package rylxes/laravel-gdpr without Composer
On this page you can find all versions of the php package rylxes/laravel-gdpr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rylxes/laravel-gdpr
More information about rylxes/laravel-gdpr
Files in rylxes/laravel-gdpr
Package laravel-gdpr
Short Description GDPR and CCPA compliance toolkit for Laravel with data export, right to erasure, consent management, and audit trails
License MIT
Homepage https://github.com/rylxes/laravel-gdpr
Informations about the package laravel-gdpr
Laravel GDPR
Full Documentation — Complete usage guide, configuration reference, and API docs.
GDPR and CCPA compliance toolkit for Laravel applications. Provides data export (portability), right to erasure, consent management, and audit trails in a single package.
Features
- Data Export (Portability) - Queue-backed export of user data as JSON, CSV, or XML with secure timed download links
- Right to Erasure - Orchestrated deletion or anonymisation respecting foreign key dependencies
- Consent Management - Audit-ready consent log with IP, user-agent, and version tracking
- Cooling-Off Period - Configurable delay before erasure execution, allowing cancellation
- Artisan Commands -
gdpr:export,gdpr:erase,gdpr:prunefor compliance officer workflows - Consent Middleware - Gate routes by consent type with
gdpr.consent:marketing - Signed Download Links - Time-limited, tamper-proof URLs via Laravel's signed routes
- CCPA Compatible - "Do not sell" opt-out support via the consent type system
- Event System -
DataExported,DataErased,ConsentRecorded,ErasureRequestedevents - Retention Policies - Configurable auto-cleanup for exports and audit logs
- Polymorphic Users - Works with any authenticatable model, not just
App\Models\User - Facade & Trait API - Use
Gdpr::export($user)or$user->recordConsent('marketing')
Installation
1. Install via Composer
2. Run the installer
This publishes the configuration file and runs migrations.
3. Implement contracts on your models
Apply Exportable and Deletable to any model containing personal data:
Usage
Data Export
Right to Erasure
Consent Management
Consent Middleware
Gate routes that require specific consent:
Data Cleanup
Configuration
Publish the config file:
Key Configuration Options
| Option | Default | Description |
|---|---|---|
export.default_format |
json |
Default export format (json, csv, xml) |
export.storage_disk |
local |
Filesystem disk for export files |
export.download_link_expiry_minutes |
60 |
Download link lifetime |
erasure.strategy |
anonymize |
Default: anonymize or delete |
erasure.cooling_off_days |
14 |
Days before erasure executes |
consent.version |
1.0 |
Current consent version |
consent.log_ip_address |
true |
Log IP with consent events |
queue.enabled |
true |
Queue export/erasure jobs |
queue.queue_name |
gdpr |
Queue name for GDPR jobs |
audit.consent_logs_retention_days |
2555 |
~7 years retention |
Per-Model Strategy Overrides
Environment Variables
Events
Listen to GDPR events for custom integrations:
| Event | When |
|---|---|
DataExported |
After a data export is completed |
DataErased |
After user data has been erased |
ConsentRecorded |
When a user gives consent |
ErasureRequested |
When an erasure request is created |
Database Schema
| Table | Purpose |
|---|---|
gdpr_consent_logs |
Consent events with timestamps, IP, and version |
gdpr_erasure_requests |
Erasure request lifecycle and audit trail |
gdpr_data_exports |
Export records with download tokens and status |
All tables use a configurable prefix (gdpr_ by default).
Testing
Local Development
Add the package as a path repository in your Laravel app's composer.json:
Then run:
Security
- Download links use Laravel's
URL::temporarySignedRoute()for tamper-proof, time-limited access - Export files are stored on a configurable disk (default:
local, not publicly accessible) - Consent logs record IP addresses for audit trail compliance
- The cooling-off period prevents accidental data loss
- All GDPR operations are logged with metadata for compliance audits
Contributing
Please see CONTRIBUTING.md for details.
License
The MIT License (MIT). Please see License File for more information.
Credits
- Sherriff Agboola
- All Contributors
Support
- Issues
- Discussions
- Email: [email protected]
All versions of laravel-gdpr with dependencies
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0
illuminate/filesystem Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/mail Version ^10.0|^11.0|^12.0
illuminate/notifications Version ^10.0|^11.0|^12.0
illuminate/queue Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0