New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

wandersonwhcr/illuminate-romans

Laravel Illuminate Romans Integration
8,553
Install
composer require wandersonwhcr/illuminate-romans
Latest Version:v3.0.0
PHP:>=8.0
Laravel:9
Older releases:5 · 6 · 8
License:MIT
Last Updated:Mar 7, 2022
Links: GitHub  ·  Packagist
Maintainer: wandersonwhcr

illuminate-romans

Laravel Illuminate Romans Integration

Build Status Latest Stable Version License

Description

This package provides a Laravel integration for Romans library, providing tools to filter string with a Roman number to int and vice-versa.

Installation

This package uses Composer as default repository. You can install it adding the name of package in require attribute of composer.json, pointing to the last stable version.

{
  "require": {
    "wandersonwhcr/illuminate-romans": "^3.0"
  }
}

Usage

This package provides facades and helpers to use with Laravel projects. Also, it was developed as a Laravel Package to automatically configure services inside application.

Facades

Illuminate Romans provides a couple of facades to convert a string with Roman number to int and an Integer to a string that represents the input as Roman number.

use Illuminate\Romans\Support\Facades\IntToRoman as IntToRomanFacade;
use Illuminate\Romans\Support\Facades\RomanToInt as RomanToIntFacade;

$value = 'MCMXCIX';

$value = RomanToIntFacade::filter($value); // 1999
$value = IntToRomanFacade::filter($value); // MCMXCIX

Helpers

Also, this package includes helpers as a bridge to facades.

$value = 'MCMXCIX';

$value = roman_to_int($value); // 1999
$value = int_to_roman($value); // MCMXCIX

Development

You can use Docker Compose to build an image and run a container to develop and test this package.

docker-compose build
docker-compose run --rm romans composer install
docker-compose run --rm romans composer test

License

This package is opensource and available under MIT license described in LICENSE.

Related Packages

hnhdigital-os/laravel-number-converter

Number to word, roman, ordinal converter

171,780 18
ellisio/laravel-phone

A phone validator for Laravel using the free Twilio phone lookup service.

29,984 11
dartui/polish-validators

Polish Validators for Laravel

1,574 4
gzero/validator

Gzero CMS Validator

957 1
korko/validator

A simple Laravel extension to add new Validator rules.

756 0

Version History

Version Released PHP Laravel License
v3.0.0 >=8.0 ^9.0 MIT
v2.2.0 >=7.4 ^8.35 MIT
v2.1.2 >=7.4 ^8.35 MIT
v2.1.1 >=7.4 ^8.35 MIT
v2.1.0 >=7.4 ^8.35 MIT