lastdragon-ru/lara-asp-formatter

The Awesome Set of Packages for Laravel - The Formatter.

0.10.0 2021-12-25 17:36 UTC

This package is auto-updated.

Last update: 2022-01-17 07:10:09 UTC


README

This package is the part of Awesome Set of Packages for Laravel.

Read more.

This package provides a customizable wrapper around Intl formatters.

Installation

composer require lastdragon-ru/lara-asp-formatter

Usage & Configuration

Formatter is very simple to use:

use LastDragon_ru\LaraASP\Formatter\Formatter;

$formatter = app()->make(Formatter::class); // For default app locale
$formatter = $formatter->forLocale('ru_RU'); // For ru_RU locale

$formatter->string(123);        // '123'
$formatter->decimal(123.45);    // '123,45'

Please check source code to see available methods and config example to available settings 🤗