riasad / number-converter
Number to word, roman, ordinal converter
dev-master
2016-02-11 16:57 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2024-11-15 11:30:14 UTC
README
This package is compatible with Laravel 4.2
Installation
Begin by installing this package through Composer. Just run following command to terminal-
composer require riasad/number-converter dev-master
Next step is to add the service provider.
Open config/app.php
, and add a new item to the providers array.
'providers' => array( ... 'Riasad\NumberConverter\NumberConverterServiceProvider', )
Now add the alias.
'aliases' => array( ... 'NumConvert' => 'Riasad\NumberConverter\Facades\NumberConverter', )
##Instructions Convert to word (Supported number range -2147483647 to 2147483647)
echo NumConvert::convert(122,'W');
Convert to roman (Supported number range 1 to 3999)
echo NumConvert::convert(122,'R');
Ordinal suffix (Supported number range 1 to 2147483647)
echo NumConvert::convert(122,'O');