承接 galangaidilakbar/numeric-mask 相关项目开发

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

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

galangaidilakbar/numeric-mask

最新稳定版本:v1.0.0

Composer 安装命令:

composer require galangaidilakbar/numeric-mask

包简介

A Laravel Nova field that automatically adds thousand separator dots while typing (e.g., 1000 becomes 1.000)

README 文档

README

A Laravel Nova field that automatically adds thousand separator dots while typing. Perfect for currency, quantities, or any numeric input that needs better readability.

Create Resource

Features

  • Real-time thousand separator formatting (e.g., 1000 → 1.000)
  • Works with copy/paste
  • Maintains numeric value in database
  • Compatible with Laravel Nova 4.x

Requirements

  • Laravel Nova 4.x or higher
  • PHP 7.3 or higher

Installation

You can install the package via composer:

composer require galangaidilakbar/numeric-mask

Usage

use Galangaidilakbar\NumericMask\NumericMask;

public function fields(Request $request)
{
    return [
        NumericMask::make('Price'),
    ];
}

That will give you separate dots while typing in the input field.

Displaying the value

Since we store the raw value in the database, you can do whatever you want with the value. For example, you can use the currency method from Laravel's Number class:

use Illuminate\Support\Number;
use Galangaidilakbar\NumericMask\NumericMask;

public function fields(Request $request)
{
    return [
        NumericMask::make("Price")->displayUsing(
            fn($value) => Number::currency($value)
        ),
    ];
}

That will display the value as a currency to be something like this: $20,000.00.

Show Resource

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固