PHPackages                             damiankulon/laravel-model-masker - 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. [Database &amp; ORM](/categories/database)
4. /
5. damiankulon/laravel-model-masker

ActiveLibrary[Database &amp; ORM](/categories/database)

damiankulon/laravel-model-masker
================================

GDPR friendly database masker for Laravel

01[1 PRs](https://github.com/damiankulon/laravel-model-masker/pulls)PHP

Since Jan 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/damiankulon/laravel-model-masker)[ Packagist](https://packagist.org/packages/damiankulon/laravel-model-masker)[ RSS](/packages/damiankulon-laravel-model-masker/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Model Masker
====================

[](#laravel-model-masker)

This package is a small PHP library for masking sensitive data. You can configure various masking strategies just add to the config file.

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

[](#installation)

Require this package with composer.

```
composer require damiankulon/laravel-model-masker
```

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --provider="LaravelModelMasker\ServiceProvider"
```

#### Example config file fur tables

[](#example-config-file-fur-tables)

```
'tables' => [
        \App\User::class    => [
            'name'       => [
                'maskStrategy' => 'starify',
            ],
            'password'   => null, // no action
            'email'      => [
                'maskStrategy' => 'hashify',
                'options'      => [
                    'template' => "%s@example.com"
                ]
            ]
        ]
]
```

### Laravel 5.7+:

[](#laravel-57)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
LaravelModelMasker\ServiceProvider::class,
```

If you want to use the facade to mask models, add this to your facades in app.php:

```
'ModelMasker' => LaravelModelMasker\Facade::class,
```

Usage
-----

[](#usage)

```
$user = User::first();
$masker = new ModelMasker();
$masker->mask($user)->save(); // Mask model attributes and save model

\ModelMasker::mask($user)->save(); // use Facade
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/37dd48aeaaecf0606b46bc2cbea103d86f471fafde9aee29cb3b0bfe77664e52?d=identicon)[damiankulon](/maintainers/damiankulon)

---

Top Contributors

[![damiankulon](https://avatars.githubusercontent.com/u/49571375?v=4)](https://github.com/damiankulon "damiankulon (1 commits)")

---

Tags

laravel

### Embed Badge

![Health badge](/badges/damiankulon-laravel-model-masker/health.svg)

```
[![Health](https://phpackages.com/badges/damiankulon-laravel-model-masker/health.svg)](https://phpackages.com/packages/damiankulon-laravel-model-masker)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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