承接 sumflyhighlab/text-combine-number 相关项目开发

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

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

sumflyhighlab/text-combine-number

Composer 安装命令:

composer require sumflyhighlab/text-combine-number

包简介

A Laravel Nova field.

README 文档

README

A Laravel Nova field which adds additional functionality to the default Number field by using PHP's number_format() function.

Screenshot of the advanced number field in form Screenshot of the advanced number field in index

Installation

You can install this package in a Laravel app that uses Nova via composer:

composer require sumflyhighlab/text-combine-number

Usage

The TextCombineNumber field provides an additional 5 methods to the default Number field, namely:

  • ->prefix('$'): Sets the prefix to be used when displaying the number.
  • ->thousandsSeparator(' '): Set the thousands separator symbol to be used when displaying the number.
  • ->decimalPoint('.'): Sets the decimal point symbol to be used when displaying the number.
  • ->decimals(3): Sets the number of decimal points to be used as well as the step value.
  • ->suffix('%'): Sets the suffix to be used when displaying the number.

You can use the field in your Nova resource like so:

namespace App\Nova;

use Sumflyhighlab\TextCombineNumber\TextCombineNumber;


class User extends Resource
{
    // ...

    public function fields(Request $request)
    {
        return [
            // ...

            TextCombineNumber::make('Price')
                ->prefix('$')
                ->thousandsSeparator(','),

            TextCombineNumber::make('Markup')
                ->decimals(0)
                ->suffix('%')
                ->min(0)->max(100),

            // ...
        ];
    }
}

Credits

Package skeleton based on simplesquid/nova-advanced-number-field.

About us

This package just build for fun

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固