Download the PHP package milenmk/laravel-gdpr-exporter without Composer

On this page you can find all versions of the php package milenmk/laravel-gdpr-exporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-gdpr-exporter

Laravel GDPR Exporter

![Latest Version on Packagist](https://img.shields.io/packagist/v/milenmk/laravel-gdpr-exporter.svg?style=flat) ![Total Downloads](https://img.shields.io/packagist/dt/milenmk/laravel-gdpr-exporter.svg?style=flat) ![GitHub User's stars](https://img.shields.io/github/stars/milenmk/laravel-gdpr-exporter) ![Laravel 10 Support](https://img.shields.io/badge/Laravel-10.x|11.x|12.x-orange?style=flat&logo=laravel) ![PHP Version Support](https://img.shields.io/packagist/php-v/milenmk/laravel-gdpr-exporter?style=flat) ![License](https://img.shields.io/packagist/l/milenmk/laravel-gdpr-exporter.svg?style=flat) ![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat) ![Sponsor me](https://img.shields.io/badge/Sponsor-%E2%9D%A4-ff69b4?style=flat)

A lightweight Livewire component for exporting user data in multiple GDPR-compliant formats: JSON, CSV, XML, and HTML.


✨ Features


🧰 Requirements


📦 Installation

🚀 Usage

  1. Add the Livewire component in your Blade view:

  2. Optional: Publish the configuration file:

  3. Optional: Publish the Blade view if you want to customize the UI:

    This will publish the file in resources/views/vendor/laravel-gdpr-exporter/livewire/gdpr.blade.php

📁 Export Formats

Format Output Content-Type
JSON Pretty-printed user data application/json
CSV Key-value flat list text/csv
XML Nested XML document application/xml
HTML Styled HTML table text/html

⚙️ Configuration

The package provides several configuration options in config/gdpr-exporter.php:

User Model

Specify the user model class to use for GDPR exports:

'user_model' => env('GDPR_USER_MODEL', 'App\Models\User'),

Relations Detection

Choose between automatic reflection-based detection or explicit whitelist:

'relations_detection' => [
    'method' => env('GDPR_RELATIONS_METHOD', 'whitelist'), // 'reflection' or 'whitelist'

    // When using 'whitelist' method, only these relations will be loaded
    'whitelist' => [
        // Example: 'posts', 'profile', 'roles', 'permissions'
    ],

    // When using 'reflection' method, these methods will be excluded
    'excluded_methods' => [
        'delete', 'destroy', 'forceDelete', 'restore', 'save',
        // ... more methods listed in the config file
    ],
],

Export Settings

Configure how data is processed during export:

'export' => [
    // Whether to remove ID fields from the exported data
    'remove_ids' => env('GDPR_REMOVE_IDS', true),

    // Whether to flatten pivot table data in the export
    'flatten_pivot' => env('GDPR_FLATTEN_PIVOT', true),
],

🧠 How It Works

🔧 Troubleshooting

"Table 'notifications' doesn't exist" Error

If you encounter an error like SQLSTATE[42S02]: Base table or view not found: 1146 Table 'notifications' doesn't exist, this happens when your User model uses the Notifiable trait but you don't have the notifications database table (common when using only email notifications).

Solutions:

  1. Use Whitelist Method (Recommended): Configure the package to use the whitelist method and only include the relations you want to export:

  2. Exclude Notifications from Reflection: If you prefer using reflection, add 'notifications' to the excluded methods:

  3. Create the Notifications Table: If you want to support database notifications in the future:

The package now includes built-in error handling that will gracefully skip relations that cause database errors, but using the whitelist method is still the safest approach.

Contributing

You can review the source code, report bugs, or contribute to the project by visiting the GitHub repository:

GitHub Repository

Feel free to open issues or submit pull requests. Contributions are welcome!

Changelog

Please see CHANGELOG.md for more information on what has changed recently.

Support My Work

If this package saves you time, you can support ongoing development:
👉 Become a Patron

Other Packages

Check out my other Laravel packages:

License

This package is licensed under the MIT License. See the LICENSE file for more details.

Disclaimer

This package is provided "as is", without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or noninfringement.

The author(s) make no guarantees regarding the accuracy, reliability, or completeness of the code, and shall not be held liable for any damages or losses arising from its use.

Please ensure you thoroughly test this package in your environment before deploying it to production.


All versions of laravel-gdpr-exporter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3|^8.4
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
livewire/livewire Version ^3.0|dev-main
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/view Version ^10.0|^11.0|^12.0|^13.0
ext-simplexml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package milenmk/laravel-gdpr-exporter contains the following files

Loading the files please wait ...