2017 © Pedro Peláez
 

library laravel-number-converter

Number to word, roman, ordinal converter

image

hnhdigital-os/laravel-number-converter

Number to word, roman, ordinal converter

  • Friday, April 13, 2018
  • by bluora
  • Repository
  • 1 Watchers
  • 1 Stars
  • 155 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 24 % Grown

The README.md

Laravel Number Converter

This package provides a Laravel wrapper to the PHP-Number-Converter package that provides the ability to convert a numerical number to a word, roman numeral, or an ordinal suffix., (*1)

Latest Stable Version Total Downloads Latest Unstable Version Built for Laravel License Donate to this project using Patreon, (*2)

StyleCI Issue Count Code Climate, (*3)

This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital., (*4)

Requirements

  • PHP ^7.2|^8.0
  • Laravel ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0

Install

Via composer:, (*5)

$ composer require hnhdigital-os/laravel-number-converter, (*6)

Enable an alias by editing config/app.php:, (*7)

'aliases' => [
    ...
    'NumConvert' => 'HnhDigital\LaravelNumberConverter\Facade',
    ...
]

Convert to word

Supported number range -2147483647 to 2147483647., (*8)

echo NumConvert::word(1);
echo number_to_word(1);
one

Convert to roman

Supported number range 1 to 3999., (*9)

echo NumConvert::roman(1);
echo number_to_roman(1);
I

Ordinal (word + suffix)

Supported number range 1 to 2147483647., (*10)

echo NumConvert::wordOrdinal(1);
echo number_to_word_ordinal(1);
first

Ordinal (number + suffix)

Supported number range 1 to 2147483647., (*11)

echo NumConvert::numberOrdinal(1);
echo number_with_ordinal_suffix(1);
1st

Contributing

Please see CONTRIBUTING for details., (*12)

Credits

License

The MIT License (MIT). Please see License File for more information., (*13)

The Versions

13/04 2018

dev-master

9999999-dev

Number to word, roman, ordinal converter

  Sources   Download

MIT

The Requires

 

laravel converter roman number word ordinal