wprk / laravel-blade-readable-numbers
A blade directive for human readable numbers, k-style.
v1.3.0
2020-12-17 08:19 UTC
Requires
- php: ^5|^7|^8
- illuminate/support: ^5|^6|^7|^8
Requires (Dev)
- larapack/dd: ^1.0
- mockery/mockery: ^1.0
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2025-06-17 18:52:14 UTC
README
-->
Adds the @longInt
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 heliumargon/laravel-blade-readable-numbers
Usage
@longInt(123456) // outputs 123K+ @longInt(123456789) // outputs 123M+ @longInt(123456789012) // outputs 123B+ @longInt(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 wprk14@gmail.com instead of using the issue tracker.
Credits
- Sander van Hooft - www.sandervanhooft.com
- Will Parker - www.wipar.co.uk
- Appstract for blade directive testing methods
- Radley Sustaire (RadGH) and Hassan Amir Khan (hassanamirkhan) for the short-number-format gist.
- All Contributors
License
The MIT License (MIT). Please see License File for more information.