Numeros en Letras
v1.2.0
Numbers in letters
Convert any number into letters with the corresponding value.
3,982,908.99
Format #1 Tres millones novecientos ochenta y dos mil novecientos ocho con noventa y nueve
#2 Tres millones novecientos ochenta y dos mil novecientos ocho Bolivianos con noventa y nueve Centavos
Format #3 3.982.908,99 (Tres millones novecientos ochenta y dos mil novecientos ocho 99/100 Bolivianos)
Seg the following steps.
By command:
$ composer require villca/numeros-en-letras
or modifying the composer.json file:
{
"require" : {
"villca/numeros-en-letras" : " v1.2 "
}
} Add to controller use NumerosEnLetras;
Add to the route in "Routes/Web.php"
$ Route::get('/villca', 'HomeController');
Create the "HomeController.php" controller
<?php
namespace App Http Controllers ;
use Illuminate Http Request ;
use NumerosEnLetras ;
class HomeController extends Controller
{
public function index ()
{
echo ' Formato #1 ' . NumerosEnLetras:: convertir ( 1988208.99 ) . ' <br> ' ;
echo ' Formato #2 ' . NumerosEnLetras:: convertir ( 1988208.99 , ' Bolivianos ' , false , ' Centavos ' ) . ' <br> ' ;
echo ' Formato #3 ' . NumerosEnLetras:: convertir ( 1988208.99 , ' Bolivianos ' , true ) . ' <br> ' ;
}
}Based on axiacore/number-to-retra