Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svilborg/laravel-db-faker-mask
Database Masking with Faker for Laravel
https://github.com/svilborg/laravel-db-faker-mask
cli command-line db faker laravel laravel-command mask php
Last synced: about 1 month ago
JSON representation
Database Masking with Faker for Laravel
- Host: GitHub
- URL: https://github.com/svilborg/laravel-db-faker-mask
- Owner: svilborg
- License: mit
- Created: 2019-07-12T07:30:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T03:16:12.000Z (over 3 years ago)
- Last Synced: 2024-04-21T03:04:17.094Z (9 months ago)
- Topics: cli, command-line, db, faker, laravel, laravel-command, mask, php
- Language: PHP
- Size: 324 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel DB Faker Masking
### Configuration
Available in config/db_mask.php
Sample configuration file
```php
return [
/*
* |--------------------------------------------------------------------------
* | DB Mask rules
* |--------------------------------------------------------------------------
* |
*/
'chunk' => 1000,
'tables' => [
'users' => [
'firstname' => 'firstName',
'lastname' => 'lastName',
'email' => function (Faker $faker) {
return $faker->email;
},
'number' => function (Faker $faker, array $record) {
return $record['id'] . $faker->numberBetween(0, 100000);
}
]
]
];
```### Usage
artisan db:mask