A Filament plugin that allows you to easily obfuscate sensitive data in table columns.
randomparanoia/filament-column-obfuscation is a Laravel package for a filament plugin that allows you to easily obfuscate sensitive data in table columns..
It currently has 0 GitHub stars and 286 downloads on Packagist (latest version v1.0.0).
Install it with composer require randomparanoia/filament-column-obfuscation.
Discover more Laravel packages by randomparanoia
or browse all Laravel packages to compare alternatives.
Last updated
A Filament plugin that allows you to easily obfuscate sensitive data in table columns, protecting personally identifiable information (PII) and other confidential data in your Filament admin panels.
use RandomParanoia\FilamentColumnObfuscation\Columns\ObfuscatedColumn;
// In your Filament resource or table
public static function table(Table $table): Table
{
return $table
->columns([
// Basic usage - masks most characters
ObfuscatedColumn::make('email')
->label('Email Address'),
// Advanced usage with customization
ObfuscatedColumn::make('phone_number')
->obfucastionPattern('phone')
->label('Phone Number')
->showFirstChars(3)
->showLastChars(2)
->obfuscationCharacter('*')
->revealOnClick(),
]);
}
You can install the package via composer:
composer require randomparanoia/filament-column-obfuscation
use RandomParanoia\FilamentColumnObfuscation\Columns\ObfuscatedColumn;
ObfuscatedColumn::make('email')
->label('Email Address');
use RandomParanoia\FilamentColumnObfuscation\Columns\ObfuscatedColumn;
ObfuscatedColumn::make('email')
->obfuscationPattern('email')
->label('Email Address');
default (default): Obfuscate all charactersname: Show first letter and last letter of the namephone: Show first 3 digits, last 3 digits, and all digits in betweenemail: Show first 2 letters, last 2 letters, and all letters in betweenaddress: Show first 5 letters and last 5 letterslocality: Show first 2 letters and last 2 lettersObfuscatedColumn::make('credit_card')
->showFirstChars(4) // Show first 4 characters
->showLastChars(4) // Show last 4 characters
->obfuscationCharacter('-') // Use custom character
->revealOnClick() // Allow revealing on click
->revealOnHover() // OR allow revealing on hover
showFirstChars(int $count): Show the first X charactersshowLastChars(int $count): Show the last X charactersobfuscationCharacter(string $char): Set the obfuscation characterrevealOnClick(bool $revealable = true): Enable click-to-reveal functionalityrevealOnHover(bool $revealable = true): Enable hover-to-reveal functionalitycomposer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.