finller / laravel-money
Wrapper for Brick/Money
Installs: 8 153
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 0
Forks: 1
Open Issues: 1
Requires
- php: ^8.1
- brick/money: ^0.8.0
- illuminate/contracts: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.13.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8|^8.1
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.8|^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^10.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-04-29 17:08:52 UTC
README
Easily use Brick/Money in your laravel App.
Installation
You can install the package via composer:
composer require finller/laravel-money
You can publish the config file with:
php artisan vendor:publish --tag="money-config"
This is the contents of the published config file:
return [
];
Usage
use Finller\MoneyCast; /** * @property ?Money $price * @property ?string $currency **/ class Invoice extends Model { protected $casts = [ 'price' => MoneyCast::class . ':currency' ] }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.