GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PostScripton/laravel-money: 💵 Laravel Money is an open source package that provides you a convinient way to work with numbers from database with high precision and use them as monetary objects

BranchesTags
Open more actions menu

Latest commit

 

History

295 Commits
295 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
config
config
 
 
docs
docs
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
codecov.yml
codecov.yml
 
 
composer.json
composer.json
 
 
docker-compose.yml
docker-compose.yml
 
 
phpunit.xml
phpunit.xml
 
 
ruleset.xml
ruleset.xml
 
 

Repository files navigation

Banner Logo
Release version Total downloads Downloads per month License
GitHub Workflow Status (branch) Coverage percent

Introduction

💵 Laravel Money is an open source package that provides you a convinient way to work with numbers from database with high precision and use them as monetary objects. With this package, you can easily operate, compare, format, and even convert monetary objects to other currencies using external API providers.

Upgrade guide

  • 3.x to 4.x

Requirements

  • PHP: ^8.1
  • guzzlehttp/guzzle: ^7.5
  • bcmath extension

Installation

composer require postscripton/laravel-money 

Publishing

Publish the config file through:

php artisan vendor:publish --provider=PostScription\Money\MoneyServiceProvider

or

php artisan vendor:publish --tag=money

After all, the config file at config/money.php should be modified for your own purposes.

Table of Contents

  1. ⏰ Quick start
  2. ✅ Usage
    • 🧰 Creating
    • 🖨️ Output
    • 📄 Cloning
    • 🎯 Casting
    • 🚨 Validation rule
  3. 🎨️ Formatting
  4. 💲 Currencies
    • Default currency
    • Information
    • Position
    • Display
    • Preferred symbol
    • Collection methods
  5. 💵 Money
    • 💲 Currency
    • Static methods
      • Money::setFormatter()
      • Money::of()
      • Money::zero()
      • Money::parse()
      • Money::min()
      • Money::max()
      • Money::avg()
      • Money::sum()
    • Object methods
      • Getters
        • getAmount()
      • Calculations
        • add()
        • subtract()
        • multiply()
        • divide()
        • rebase()
      • Object manipulations
        • floor()
        • ceil()
        • absolute()
        • negate()
        • clone()
      • Logical operations
        • Comparing currencies
        • isNegative()
        • isPositive()
        • isZero()
        • lessThan()
        • lessThanOrEqual()
        • greaterThan()
        • greaterThanOrEqual()
        • equals()
      • Converting to string
      • Converting currencies
  6. API rate exchangers
    • Add your own

License

Laravel-money is an open-source library under the MIT license.

About

💵 Laravel Money is an open source package that provides you a convinient way to work with numbers from database with high precision and use them as monetary objects

packagist.org/packages/postscripton/laravel-money

Topics

convert-numberscurrencydatabaseexchage-ratesformattinglaravelmoneymoney-converterphprate-exchange

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

19 stars

Watchers

2 watching

Forks

5 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.