Download the PHP package arseno25/filament-privacy-blur without Composer

On this page you can find all versions of the php package arseno25/filament-privacy-blur. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-privacy-blur

Filament Privacy Blur

Latest Release Total Downloads License

About

Filament Privacy Blur provides visual privacy protection for sensitive data in Filament admin panels. It helps prevent accidental exposure during screen sharing, shoulder surfing, or working in public spaces.

What It Does

What It Does NOT Do

This is a visual privacy layer only. It does NOT provide:

Blur modes keep original data in the DOM. For highly sensitive fields, use mask mode (server-side redaction) or implement data masking at your model/API layer.

Why This Package Exists

When building Filament admin panels, you often need to display sensitive data (emails, salaries, phone numbers) while reducing the risk of accidental exposure during:

This package provides a convenient, authorization-aware way to add visual privacy without manually implementing blur logic for every field.

Features

Requirements

Installation

Publish the configuration file:

Publish and run the migration (for audit logging):

Setup

Register the plugin in your Filament panel provider:

Plugin Configuration Options

Method Description Default
defaultMode(string $mode) Default privacy mode blur_click
blurAmount(int $amount) CSS blur intensity (1-10) 4
exceptColumns(array $columns) Columns to exclude from privacy []
exceptResources(array $resources) Resource classes to exclude []
exceptPanels(array $panels) Panel IDs to exclude []
enableAudit() Enable audit logging disabled
showGlobalRevealToggle() Show global reveal toggle enabled
hideGlobalRevealToggle() Hide global reveal toggle -

Quick Start

Blur a Table Column

Mask a Table Column

Reveal with Authorization

Protect Form Inputs

Protect Infolist Entries

Never Reveal (Maximum Security)

How It Works

The package makes privacy decisions server-side and renders HTML data attributes that guide frontend behavior:

Authorization

This package is ability-first — it prioritizes Laravel's built-in authorization system.

Recommended: Ability-Based Authorization

Use revealIfCan() with Laravel Gates or Policies:

Custom Closure Authorization

Permission-Based Authorization

Role-Based Authorization (Optional)

Force Blur for Specific Roles

Users in these roles will always see blur, even if authorized via other means.

Secure-by-Default in Practice

Privacy Modes

blur — Always Blurred

blur_click — Click to Reveal (Default)

blur_hover — Hover to Reveal

blur_auth — Blur for Unauthorized Only

mask — Server-Side Masking

hybrid — Maximum Protection

disabled — No Privacy

Mode Behavior Table

Mode Authorized Unauthorized Interactive Reveal Global Reveal Raw Data in DOM
disabled Plain Plain N/A N/A Yes
blur Plain 🔒 Blur No No Yes
blur_click 🔒 Blur → Click 🔒 Blur Yes (auth only) Yes (auth only) Yes
blur_hover 🔒 Blur → Hover 🔒 Blur Yes (auth only) Yes (auth only) Yes
blur_auth Plain 🔒 Blur No No Yes
mask Plain 🎭 Masked No No No
hybrid 🎭 Masked 🎭 Masked + 🔒 Blur No No Masked only

Global Reveal Toggle

The global reveal toggle appears as an eye icon button in the Filament topbar.

When Does the Toggle Appear?

This happens automatically via Alpine.js — no configuration needed.

What Can Be Globally Revealed?

The toggle can only reveal fields that:

  1. The current user is authorized to view (via revealIfCan(), permission(), etc.)
  2. The field is NOT marked as revealNever()
  3. The field is NOT in hiddenFromRoles() for the current user
  4. The privacy mode supports global reveal (blur_click, blur_hover)

What Cannot Be Globally Revealed?

The toggle will NEVER reveal:

Security Guarantee

The global reveal toggle cannot bypass authorization. Only fields where the server explicitly sets data-privacy-can-globally-reveal="true" will be revealed. The frontend Alpine.js code only respects server decisions.

Mask Strategies

Strategy Example Output Description
email j***[email protected] Shows first char, masks middle, shows domain
phone 0812****7890 Shows prefix, masks middle digits, shows suffix
nik 3173********9012 Shows first 4 and last 4 digits
full_name Jo** Do* Shows first 2 and last 2 chars of each word
api_key sk_***_key Shows first 3 and last 3 chars
address Jl. Sudirma*** Shows first 12 characters
currency *** Masks currency values entirely
generic J***h Shows first and last character

Using Mask Strategies

Audit Logging

When enabled, the package logs reveal actions to the privacy_reveal_logs table.

When Does Audit Logging Happen?

Audit logging occurs when:

  1. Audit is enabled at plugin level (->enableAudit())
  2. Audit is not disabled for the specific field (->withoutAuditReveal())
  3. A reveal action is performed (click, hover, or global toggle)
  4. The user is authorized to perform the reveal

Stored Audit Fields

Field Description
user_id ID of the user who revealed the data
tenant_id Tenant ID for multi-tenant apps
panel_id Filament panel ID
resource Resource identifier (e.g., App\Filament\Resources\UserResource)
page Full URL of the page where reveal occurred
column_name Name of the column that was revealed
record_key Primary key of the record
reveal_mode Privacy mode used (e.g., blur_click)
ip_address IP address of the user
user_agent Browser/user agent string
created_at Timestamp of the reveal action

Enabling Audit Logging

Per-Field Audit Control

Export Safety

Why Visual Blur is Not Safe for Exports

CSS blur only affects visual rendering in the browser. When exporting data to CSV/Excel, the original data is included unless explicitly masked.

How Export Context is Handled

The package automatically detects Filament export contexts and:

  1. Replaces blur with masking — blur_click fields are masked using the configured strategy
  2. Preserves mask strategies — Custom masking strategies are applied during export
  3. Protects sensitive data — Original values are never included in exports

Export Behavior Examples

Security Limitations

Important: What This Package Does NOT Provide

  1. Not Encryption — Blur modes keep original data in the DOM
  2. Not Backend Access Control — Does not replace API authentication
  3. Not API-Level Redaction — Does not protect JSON API endpoints
  4. Not Database Security — Does not encrypt data at rest

Recommended Usage by Data Sensitivity

Data Type Recommended Mode Reason
Email mask or blur_click Mask for high sensitivity, blur for medium
Phone mask or blur_click Mask for high sensitivity, blur for medium
Salary blur_click with auth Blur with strict authorization
SSN/Tax ID mask + revealNever() Always mask, never reveal
API Keys mask + revealNever() Maximum security
Internal Notes blur_auth with auth Blur for unauthorized, clear for authorized

For Highly Sensitive Data

Consider implementing backend data redaction:

API Reference

Column/Entry/Field Macros

private()

Enable privacy with default settings (equivalent to privacyMode('blur_click')):

privacyMode(string $mode)

Set the privacy mode:

Available modes: 'blur', 'blur_click', 'blur_hover', 'blur_auth', 'mask', 'hybrid', 'disabled'

revealOnClick() / revealOnHover()

Convenience methods for common modes:

revealNever()

Prevent all reveal methods:

blurAmount(int $amount)

Set CSS blur intensity (1-10):

maskUsing(string|Closure $strategy)

Set masking strategy:

Authorization Methods

revealIfCan(string $ability, Model $record = null)

Authorize via Laravel Gate or Policy (recommended):

authorizeRevealWith(string $ability, Model $record = null)

Alias for revealIfCan() with explicit semantics:

authorizeRevealUsing(Closure $callback)

Custom authorization closure:

permission(string $permission)

Require specific permission:

visibleToPermissions(array $permissions)

Require any of the specified permissions:

visibleToRoles(array $roles)

Require any of the specified roles:

hiddenFromRoles(array $roles)

Force blur for specific roles:

Audit Methods

auditReveal(bool $enabled = true)

Enable audit for this field:

withoutAuditReveal()

Disable audit for this field:

Plugin Configuration Methods

defaultMode(string $mode)

Set default privacy mode:

blurAmount(int $amount)

Set default blur intensity:

exceptColumns(array $columns)

Exclude specific columns:

exceptResources(array $resources)

Exclude specific resources:

exceptPanels(array $panels)

Exclude specific panels:

enableAudit()

Enable audit logging globally:

showGlobalRevealToggle() / hideGlobalRevealToggle()

Control toggle visibility:

Configuration

After publishing, edit config/filament-privacy-blur.php:

Compatibility

Component Supported Versions
PHP 8.2, 8.3, 8.4
Laravel 11, 12
Filament v4.x, v5.x
Alpine.js Bundled with Filament

Package Integration

Package Status Notes
Filament Shield ✅ Compatible Works via Laravel Gates
Spatie Laravel Permission ✅ Compatible Works via can() method
Spatie Tenancy ✅ Compatible Tenant ID captured in audit logs

Contributing

  1. Install dependencies:

  2. Run tests:

  3. Run static analysis:

  4. Run code style checks:

  5. Fix code style:

Development Standards

Changelog

Please see CHANGELOG for recent changes.

License

The MIT License (MIT). Please see License File for more information.


**Made with ❤️ for the Filament community**

All versions of filament-privacy-blur with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arseno25/filament-privacy-blur contains the following files

Loading the files please wait ...