wilsilva/money 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

wilsilva/money

Composer 安装命令:

composer require wilsilva/money

包简介

My first package, convert and management number in money

关键字:

README 文档

README

Latest Stable Version Latest Unstable Version Total Downloads License composer.lock

Introduction

My first package, convert number in money.

Installation

To install Money, just run the following command:

	composer require wilsilva/money

Configuration

After installing the Money library, register the WilSilva\Money\MoneyServiceProvider in your config/app.php configuration file:

'providers' => [
    // Other service providers...

    WilSilva\Money\MoneyServiceProvider::class,
],

Add the MoneyFacade facade to the aliases array in your app configuration file:

'Money' => WilSilva\Money\Facade\MoneyFacade::class,

To publish the config settings in Laravel 5 use:

	php artisan vendor:publish --provider="WilSilva\Money\MoneyServiceProvider"

If you change type money, only to change in config/money.php

<?php //config file

return [
	'money-type' => 'USD', // change to BRL for example
];

	

Usage

	echo Money::convertNumberToMoney(99.90); // dump $ 99,90
	// or
	echo Money::convertMoneyToNumber("$ 99,90"); // dump float 99.90

Helpers

 convert_number_to_money(15.50, "BRL") // dump R$ 15,50

 convert_money_to_number("R$2000,00", "BRL") // dump 2000.00

 offer_descount("$100,00", 20, "USD") // $ 80,00

License

The Money Library is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固