PHP code example of wilsilva / money

1. Go to this page and download the library: Download wilsilva/money library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wilsilva / money example snippets



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

    WilSilva\Money\MoneyServiceProvider::class,
],

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


 //config file

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

	



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


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