PHPackages                             signdeck/veil - 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. signdeck/veil

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

signdeck/veil
=============

Laravel package to anonymize database exports

1.5(1mo ago)173MITPHPPHP ^8.3CI passing

Since Dec 17Pushed 1mo agoCompare

[ Source](https://github.com/signdeck/veil)[ Packagist](https://packagist.org/packages/signdeck/veil)[ RSS](/packages/signdeck-veil/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (8)Versions (12)Used By (0)

Veil
====

[](#veil)

[![Tests](https://github.com/signdeck/veil/actions/workflows/tests.yml/badge.svg)](https://github.com/signdeck/veil/actions/workflows/tests.yml)

Veil is a Laravel package that helps you export database **data** to anonymize sensitive columns.

It's useful when you need to:

- Share production-like data with developers or contractors
- Create safe accurate data for local or staging environments
- Debug real-world issues without exposing personal data
- Comply with privacy and data protection requirements

Veil lets you define anonymization rules per table and column, ensuring sensitive values are replaced consistently during export. The exported SQL file contains only INSERT statements, making it easy to import into an existing database that already has the schema defined via Laravel migrations.

It uses [spatie/laravel-db-snapshots](https://github.com/spatie/laravel-db-snapshots) and [phpmyadmin/sql-parser](https://github.com/phpmyadmin/sql-parser) under the hood and focuses on keeping the workflow simple and predictable.

> "This package was created and maintained by the team behind [SignDeck — a lightweight e-signature platform for collecting documents and signatures.](https://getsigndeck.com)"

**Supports Laravel version 11+**

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

[](#installation)

You can install the package via Composer:

```
composer require signdeck/veil
```

Publish the configuration file:

```
php artisan vendor:publish --tag=veil-config
```

This will create a `config/veil.php` file where you can configure your export settings.

Make sure you also have a filesystem disk configured for storing exports. By default, Veil uses the `local` disk.

Usage
-----

[](#usage)

### 1. Create a Veil Table Class

[](#1-create-a-veil-table-class)

Generate a new Veil table class using the artisan command:

```
php artisan veil:make-table users
```

This creates `app/Veil/VeilUsersTable.php`:

```
