承接 karyasystem/rupiah-helper 相关项目开发

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

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

karyasystem/rupiah-helper

最新稳定版本:1.0.1

Composer 安装命令:

composer require karyasystem/rupiah-helper

包简介

An advanced and flexible Rupiah Currency Helper for Laravel. Provides functions for formatting numbers into Rupiah format (IntToRupiah), converting Rupiah format back to integers (RupiahToInt), and converting numbers to Indonesian text (Terbilang). Includes extensive options to customize the currenc

README 文档

README

An advanced and flexible Rupiah Currency Helper for Laravel. This package provides functions to format numbers into Rupiah format (IntToRupiah), convert Rupiah format back to integers (RupiahToInt), and convert numbers to Indonesian text (Terbilang). It includes extensive options to customize the currency format to suit your needs, making it a powerful tool for handling Rupiah in Laravel applications.

Features

  • IntToRupiah: Format integers into Rupiah currency (IDR or Rp) with customizable options.
  • RupiahToInt: Convert Rupiah-formatted strings back to integers.
  • Terbilang: Convert numbers to Indonesian text representation (terbilang).

Installation

To install the package, run the following command in your Laravel project:

  composer require karyasystem/rupiah-helper

Usage

IntToRupiah

Use this function to format an integer into Rupiah currency format

use Rupiah;

$formattedRupiah = Rupiah::IntToRupiah(1000000, 'Rp'); // Rp 1,000,000
$formattedRupiah = Rupiah::IntToRupiah(1000000); // IDR 1,000,000 (default is 'IDR')

options

  • currency: (optional) 'Rp' or 'IDR' (default is 'Rp')
  • format: (optional) Choose to display thousands separator, decimal point, etc.

RupiahToInt

Use this function to convert a Rupiah-formatted string back to an integer.

$intValue = Rupiah::RupiahToInt('Rp 1,000,000'); // 1000000

Terbilang

Use this function to convert numbers into their Indonesian text representation.

$text = Rupiah::Terbilang(1234567); // "Satu juta dua ratus tiga puluh empat ribu lima ratus enam puluh tujuh"

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

License

This package is open-source and available under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-12