PHPackages                             y-ui/laravel-data-masking - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. y-ui/laravel-data-masking

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

y-ui/laravel-data-masking
=========================

A mysql data masking tool with Laravel

v1.0.4(6y ago)293.3k↓33.3%4MITPHPPHP &gt;=7.0.0

Since Aug 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/y-ui/laravel-data-masking)[ Packagist](https://packagist.org/packages/y-ui/laravel-data-masking)[ RSS](/packages/y-ui-laravel-data-masking/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

laravel-data-masking
====================

[](#laravel-data-masking)

[![Latest Stable Version](https://camo.githubusercontent.com/bc44443b2fe8f954df2021e285676faa26ee0b41147ef6208cdf0626a58767b9/68747470733a2f2f706f7365722e707567782e6f72672f792d75692f6c61726176656c2d646174612d6d61736b696e672f762f737461626c65)](https://packagist.org/packages/y-ui/laravel-data-masking)[![Total Downloads](https://camo.githubusercontent.com/3f7db71f5ddfe8eb20c3878b6cb3c5e98203cdc29f26704f2a6a3eba85d2e33e/68747470733a2f2f706f7365722e707567782e6f72672f792d75692f6c61726176656c2d646174612d6d61736b696e672f646f776e6c6f616473)](https://packagist.org/packages/y-ui/laravel-data-masking)[![Latest Unstable Version](https://camo.githubusercontent.com/650382a821d865dd080baa33165daaf9b984adc0a4c8e20532803f30a064487c/68747470733a2f2f706f7365722e707567782e6f72672f792d75692f6c61726176656c2d646174612d6d61736b696e672f762f756e737461626c65)](https://packagist.org/packages/y-ui/laravel-data-masking)[![License](https://camo.githubusercontent.com/9f5ff5db5b306a5c0fe26b9a8031e665cfa27925563b47a3f0761cd99f50a0f8/68747470733a2f2f706f7365722e707567782e6f72672f792d75692f6c61726176656c2d646174612d6d61736b696e672f6c6963656e7365)](https://packagist.org/packages/y-ui/laravel-data-masking)

Installation
------------

[](#installation)

```
composer require --dev y-ui/laravel-data-masking ^1.0

```

Configuration
-------------

[](#configuration)

If you’re on Laravel 5.5 or later the package will be auto-discovered.

Otherwise you will need to manually configure it in your `config/app.php` and add the following to the providers array:

```
\Yui\DataMasking\DataMaskingServiceProvider::class,
```

Usage
-----

[](#usage)

### Simple usage

[](#simple-usage)

1.scan database and generate config file `config/data-masking.php`

```
php artisan data:scan
```

2.Edit config file `data-masking.php`

3.Execute

```
php artisan data:mask
```

### Options

[](#options)

```
#Specify the name of the table to scan
php artisan data:scan --tables=users,orders

#Update only data that meets the criteria
php artisan data:mask --tables=users --where='id>100'

```

### Config File

[](#config-file)

You can customize any character

```
'name' => ''          nothing to do
'name' => '*:1-'      Tom => ***  Replace all characters
'name' => '0:2-4'     William => W000iam
'name' => '0:3-5'     Tom => To000
'phone' => '*:4-7'    18666666666 => 186****6666
'phone' => '123:4-'   18666666666 => 18612312312
'phone' => '*:1~2'    18666666666 => 1********66  Keep the first and end character
'email' => 'email:3-' production@google.com => pr********@google.com  Replace only the characters before @
'name' => 'text:Alex' everything => Alex  Replace all value to text

```

You can also use faker to replace column

```
'address' => 'faker:address'
'date' => "faker:date($format = 'Y-m-d', $max = 'now')"
'name' => 'faker:name'

```

If there is a field with a content of 0-9, you want to set it all to 2

```
'cloumn_name' => '2:1-' //This is faster than using faker
```

Faker wiki

If you want to use chinese, open `config/app.php` add `'faker_locale' => 'zh_CN'`,

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Total

5

Last Release

2206d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7334733?v=4)[y-ui](/maintainers/y-ui)[@y-ui](https://github.com/y-ui)

---

Top Contributors

[![y-ui](https://avatars.githubusercontent.com/u/7334733?v=4)](https://github.com/y-ui "y-ui (2 commits)")

### Embed Badge

![Health badge](/badges/y-ui-laravel-data-masking/health.svg)

```
[![Health](https://phpackages.com/badges/y-ui-laravel-data-masking/health.svg)](https://phpackages.com/packages/y-ui-laravel-data-masking)
```

###  Alternatives

[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1481.0k](/packages/eliashaeussler-typo3-form-consent)[ronasit/laravel-helpers

Provided helpers function and some helper class.

1475.7k13](/packages/ronasit-laravel-helpers)[inspiredminds/contao-fieldset-duplication

Contao extension to allow the duplication of form fieldsets in the front end by the user for additional input fields.

158.2k1](/packages/inspiredminds-contao-fieldset-duplication)[numero2/contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data

121.5k](/packages/numero2-contao-storelocator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
