2017 © Pedro Peláez
 

library brutils

Common php utilities

image

bronanza/brutils

Common php utilities

  • Tuesday, October 24, 2017
  • by erickkur
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Brutils

PHP common utilities with laravel support., (*1)

Installation

Add the following to composer.json. Then run composer update, (*2)

"bronanza/brutils": "dev-master"

Optional

For laravel support, open config/app.php and register service provider to the providers array, (*3)

Bronanza\Brutils\ServiceProvider::class

In the same config file config/app.php add the following to the aliases array, (*4)

NumberFormatter => Bronanza\Brutils\Number\FormatterFacade::class,
CurrencyFormatter => Bronanza\Brutils\Currency\FormatterFacade::class,

Run the command below to publish the package config file config/brutils.php, (*5)

php artisan vendor:publish

Quick Usage

Formatter

$formatter = new \Bronanza\Brutils\Number\Formatter(0, ',', '.');
$formatter->format(10000) === '10.000';

$currencyFormatter = new \Bronanza\Brutils\Currency\Formatter($formatter, '$');
$formatter->format(10000) === '$10.000';

// Or if you've registered the facades (config based on config/brutils.php)
NumberFormatter::format(10000) === '10.000';
CurrencyFormatter::format(10000) === '$10.000';

License

MIT, (*6)

Yeay, (*7)

The Versions

24/10 2017

dev-master

9999999-dev

Common php utilities

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sendy Halim