File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 3
3
![ Downloads] ( https://img.shields.io/packagist/dt/akaunting/laravel-money )
4
4
![ Tests] ( https://img.shields.io/github/actions/workflow/status/akaunting/laravel-money/tests.yml?label=tests )
5
5
[ ![ StyleCI] ( https://github.styleci.io/repos/112121508/shield?style=flat&branch=master )] ( https://styleci.io/repos/112121508 )
6
- [ ![ Check Imports] ( https://github.com/akaunting/laravel-money/actions/workflows/check_imports.yml/badge.svg?branch=master )] ( https://github.com/akaunting/laravel-money/actions/workflows/check_imports.yml )
7
6
[ ![ License] ( https://img.shields.io/github/license/akaunting/laravel-money )] ( LICENSE.md )
8
7
9
8
This package intends to provide tools for formatting and conversion of monetary values in an easy, yet powerful way for Laravel projects.
@@ -142,13 +141,13 @@ Define the mixin class:
142
141
``` php
143
142
use Akaunting\Money\Money;
144
143
145
- class CustomMoney
144
+ class CustomMoney
146
145
{
147
146
public function absolute(): Money
148
147
{
149
148
return $this->isPositive() ? $this : $this->multiply(-1);
150
149
}
151
-
150
+
152
151
public static function zero(?string $currency = null): Money
153
152
{
154
153
return new Money(0, new Currency($currency ?? 'GBP'));
You can’t perform that action at this time.
0 commit comments