承接 anish/maskable-entry 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anish/maskable-entry

Composer 安装命令:

composer require anish/maskable-entry

包简介

A powerful Filament PHP infolist component that enables seamless maskable entry. Features include maskable entry, preview functionality, and easy integration with Laravel. Perfect for maskable values in infolists.

README 文档

README

maskable-entry

A reusable maskable entry component for Filament Infolists.

A powerful Filament PHP infolist component that enables seamless maskable entry. Ideal for hiding and toggling sensitive values such as passwords, social security numbers, credit card numbers, and API keys.

Features

  • 🔒 Maskable Display — Hide sensitive data with custom mask patterns
  • 👁️ Toggle Visibility — One click to reveal or hide the actual value
  • 🎨 Native Filament v4 & v5 Integration — Works like any infolist entry
  • ⚙️ Fully Configurable — Custom patterns, masking characters, closures
  • 📱 Responsive — Works across all device sizes

Requirements

  • PHP 8.1+
  • Laravel 10+
  • Filament 4.x or 5.x

Installation

composer require anish/maskable-entry

The package auto-discovers its service provider—no manual setup required.

Basic Usage

use Anish\MaskableEntry\Components\MaskableEntry;
use Illuminate\Support\Facades\Auth;
use Filament\Schemas\Schema;

public static function configure(Schema $schema): Schema
{
    return $schema->components([
        MaskableEntry::make('social_security_number')
            ->maskValue('XXX-XX-XXXX')
            ->actualValue(fn ($record) => $record->social_security_number)
            ->toggleable(Auth::user()->can('view_social_security_number'))
            ->label('Social Security Number'),
    ]);
}

Note:

If you are using a custom theme add the plugin's views to your theme css file or your app's css file.

@source '../../../../vendor/anish/maskable-entry/resources/views/**/*.blade.php

Advanced Usage

Custom Mask Pattern

MaskableEntry::make('credit_card')
    ->maskValue('XXXX-XXXX-XXXX-XXXX')
    ->actualValue(fn ($record) => $record->credit_card_number)
    ->label('Credit Card Number');

Using a Closure for Actual Value

MaskableEntry::make('password')
    ->maskValue('XXXXXXXX')
    ->actualValue(fn (User $record) => $record->password)
    ->label('Password');

Available Methods

maskValue(string $value)

The pattern shown in masked mode. Use X (or your custom char) to represent masked digits.

->maskValue('XXX-XX-XXXX')

actualValue(string|Closure|null $value)

Defines the value revealed on toggle.

->actualValue(fn ($record) => $record->social_security_number)
// or
->actualValue('123-45-6789')

Supports All Standard TextEntry Methods

MaskableEntry::make('field')
    ->maskValue('XXX-XX-XXXX')
    ->actualValue(fn ($record) => $record->value)
    ->label('Custom Label')
    ->placeholder('N/A')
    ->copyable()
    ->icon('heroicon-o-shield-check');

How It Works

  1. Masked State — Displays the mask pattern (XXX-XX-XXXX)
  2. Toggle Button — Eye icon switches visibility
  3. Revealed State — Shows the actual value formatted
  4. Formatting — Automatically aligns characters to mask structure

Testing

composer test

Code Style

This package uses Laravel Pint:

composer format

Contributing

Contributions are welcome!

Development Setup

  1. Clone the repo
  2. composer install
  3. Create a new branch
  4. Write your feature
  5. Run tests & Pint
  6. Submit PR

Security

If you find a security issue, please email: anishregminaglibang@gmail.com

Changelog

See CHANGELOG.

Credits

License

MIT

anish/maskable-entry 适用场景与选型建议

anish/maskable-entry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 375 次下载、GitHub Stars 达 12, 最近一次更新时间为 2025 年 11 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「laravel-package」 「filament」 「filament-component」 「anishregminaglibang」 「maskable-entry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 anish/maskable-entry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 anish/maskable-entry 我们能提供哪些服务?
定制开发 / 二次开发

基于 anish/maskable-entry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 375
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 26
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-28