Skip to content

Number to word, roman and ordinal converter for laravel 4.2

Notifications You must be signed in to change notification settings

0xharsha/number-converter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');

About

Number to word, roman and ordinal converter for laravel 4.2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%