Summer Sale! All accounts are 50% off this week.

Merklin's avatar

Package to add user data download functionality

Another small but hopefully useful Laravel package made by me.

Laravel GDPR Exporter is a GDPR-compliant user data exporter with Livewire support.

Features

  • Export authenticated user data in: ✅ JSON ✅ CSV ✅ XML ✅ HTML
  • Automatically loads all Eloquent relations
  • Filter out ID columns and other columns ending in _id or _by
  • Streamed downloads
  • Beautifully formatted output

The view also has a button to show the data as pretty JSON formatted code without downloading a file.

GIT: https://github.com/milenmk/laravel-gdpr-exporter

Packagist: https://packagist.org/packages/milenmk/laravel-gdpr-exporter

1 like
5 replies
vincent15000's avatar

Interesting ... to be tested ... but it's quite easy to do that ...

krisi_gjika's avatar

@Merklin checking the repo I see 2 issues with UserDataExporterService, first it assumes a User model instance will be passed, which is not always true, especially when in your component you pass Auth::user(),

secondly the part

$result = $method->invoke($user);
if ($result instanceof Relation) ...

invoking methods on the class blindly can have destructive consequences, when you don't know what they do

1 like
Merklin's avatar

@krisi_gjika Thank you for your feedback. I've made changes to the package to reflect the issues you've mentioned.

Please or to participate in this conversation.