Skip to content

This package will provide a simple helper to format a number into a human friendly number

License

Notifications You must be signed in to change notification settings

zhanang19/human-readable-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Readable Number

This package will provide a simple helper to format a number into a human friendly number

Installation

Run command composer require zhanang19/human-readable-number to install this package

This package is tested only in Laravel 7

Usage

Only one parameter needed, the number. Parameter accepted type is string, float, and int. There is 3 ways to use this package:

  1. Calling static method
    \Zhanang19\HumanReadableNumber\HumanReadableNumber::format(123); // 123
    \Zhanang19\HumanReadableNumber\HumanReadableNumber::format(12300); // 12K+
  2. Use a helper function
    readablenumber(12312); // 12K+
  3. Use blade directive
    // view.blade.php
    @readableNumber(12312) // 12K+

Support

About

This package will provide a simple helper to format a number into a human friendly number

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages