Download the PHP package ramiroestrella/laravel-database-anonymize without Composer
On this page you can find all versions of the php package ramiroestrella/laravel-database-anonymize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ramiroestrella/laravel-database-anonymize
More information about ramiroestrella/laravel-database-anonymize
Files in ramiroestrella/laravel-database-anonymize
Package laravel-database-anonymize
Short Description Laravel Database Anonymize is a package designed to streamline data anonymization, enabling organizations to safeguard privacy, comply with regulations, reduce the risk of data breaches, and share data securely.
License MIT
Informations about the package laravel-database-anonymize
Laravel Database Anonymize
Laravel Database Anonymize is a package designed to streamline data anonymization, enabling organizations to safeguard privacy, comply with regulations, reduce the risk of data breaches, and share data securely.
Key Benefits:
-
Privacy Protection
Anonymization removes or masks sensitive personally identifiable information (PII) such as names, addresses, emails, and phone numbers, preserving individuals' privacy. -
Regulatory Compliance
Meet legal and industry standards like the EU's General Data Protection Regulation (GDPR) by anonymizing sensitive data to ensure compliance. -
Risk Mitigation
Minimize the impact of data breaches by reducing the exposure of sensitive information, thereby safeguarding against financial losses, reputational damage, and identity theft. - Secure Data Sharing
Share anonymized datasets with researchers or other organizations without compromising privacy, fostering collaboration and innovation in fields like healthcare, finance, and social sciences.
Installation
Install the package via Composer:
Publish the configuration file with:
The published configuration file (config/laravel-database-anonymize.php) includes:
Usage
Step 1: Implement the Anonymizable Trait
Add the Anonymizable trait to models containing sensitive data and define the anonymizableAttributes method.
Example (App\Models\User):
Step 2: Anonymize Related Models
If your model has relationships, you can specify the data to anonymize within related models using the relations property.
Example (App\Models\Employee):
In this example:
- The
nameattribute of theEmployeemodel is anonymized. - The related
personmodel has itsfirst_nameandfamily_nameattributes anonymized as well.
Step 3: Run the Anonymization Command
Anonymize all models:
Anonymize specific models:
Exclude a specific model:
Configuration Options
- Locale: Defines the locale used by Faker (default:
en_US). - Chunk Size: Processes data in chunks for memory efficiency (default:
1000). - Restricted Environments: Prevents accidental anonymization in critical environments like production or staging.
- Priority Models: Ensures dependent models are anonymized in the correct order.
License
This package is open-sourced software licensed under the MIT License.
All versions of laravel-database-anonymize with dependencies
illuminate/console Version >=8.0
illuminate/support Version >=8.0
illuminate/contracts Version >=8.0