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. With this package, you can easily operate, compare, format, and even convert monetary objects to other currencies using external API pro
Installs: 15 203
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 3
Forks: 4
Open Issues: 4
Requires
- php: ^8.1
- ext-bcmath: *
- ext-json: *
- guzzlehttp/guzzle: ^7.5
- spatie/laravel-package-tools: ^1.12
Requires (Dev)
- orchestra/testbench: ^7.0
- slevomat/coding-standard: ^8.5
- squizlabs/php_codesniffer: ^3.6
README
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
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
- ⏰ Quick start
- ✅ Usage
- 🎨️ Formatting
- 💲 Currencies
- 💵 Money
- 💲 Currency
- Static methods
- Object methods
- Getters
- Calculations
- Object manipulations
- Logical operations
- Converting to string
- Converting currencies
- API rate exchangers
License
Laravel-money is an open-source library under the MIT license.