sandervanhooft/laravel-blade-readable-numbers

A blade directive for human readable numbers, k-style.

v1.0.0 2018-12-05 19:37 UTC

This package is auto-updated.

Last update: 2024-11-06 10:23:16 UTC


README

Latest Version on Packagist Build Status Total Downloads

Adds the @readable_int directive to Laravel's Blade templating system. This way you can shorten numbers into strings like 123K+.

Installation

You can install the package via composer:

composer require sandervanhooft/laravel-blade-readable-numbers

Usage

@readable_int(123456) // outputs 123K+
@readable_int(123456789) // outputs 123M+
@readable_int(123456789012) // outputs 123B+
@readable_int(123456789012345) // outputs 123T+

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email info@sandervanhooft.com instead of using the issue tracker.

Credits

Never miss a new package release

Subscribe to the newsletter at sandervanhooft.com to learn about the latest Laravel packages and tricks.

License

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