Download the PHP package intermax/blur without Composer
On this page you can find all versions of the php package intermax/blur. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download intermax/blur
More information about intermax/blur
Files in intermax/blur
Package blur
Short Description Package for Laravel to help obfuscate your database.
License MIT
Informations about the package blur
Blur
Blur is a Laravel package that helps you obfuscate sensitive data in your database. It's perfect for creating anonymized copies of production databases for development and testing environments.
Features
- 🔄 Obfuscate specific tables and columns in your database
- 🧩 Use Faker to generate realistic but fake data
- 🚀 Memory-optimized for handling large datasets
- 🔍 Interactive mode to select which tables to obfuscate
- 🛠️ Customizable obfuscation strategies
- 🔒 Safety checks to prevent running in production environments
Installation
You can install the package via composer:
After installation, publish the configuration file:
Configuration
After publishing the configuration, you can find the configuration file at config/blur.php. Here's an example configuration:
Configuration Options
- tables: An array of tables to obfuscate
- columns: (Optional, can be omitted when the table needs to be cleared) The columns to obfuscate and the obfuscation method to use. Only columns that should be obfuscated need to be specified.
- chunk_size: (Optional) The number of records to process at once (default: 2000). See Performance Considerations
- keys: (Optional) The key columns to use. The key columns are discovered when obfuscating, but if that fails (for example when there are no primary keys) the unique 'key' can be specified.
- method: (Optional) The method to use for obfuscation (default: 'update', alternative: 'clear' to clear the table. This can be useful for tables like
jobsor tables that store audit logs.)
Usage
To obfuscate your database, run the following command:
⚠️ This will change records (as you configured) for the default database connection.
Interactive Mode
You can use the interactive mode to select which tables to obfuscate:
This will display a list of configured tables and allow you to select which ones to obfuscate.
Obfuscation Methods
Faker
Blur comes with built-in support for Faker. You can use any Faker method by prefixing it with faker::
Custom Obfuscators
You can create your own obfuscators by implementing the Intermax\Blur\Contracts\Obfuscator interface:
Then use it in your configuration:
Performance Considerations
Blur processes records in chunks. You can adjust the chunk_size in the configuration to balance between memory usage and performance.
License
The MIT License (MIT). Please see License File for more information.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
All versions of blur with dependencies
laravel/framework Version ^11.0 | ^12.0
fakerphp/faker Version ^1.0
laravel/prompts Version ^0.3.5