pharaonic / laravel-readable
Readable numbers, dates, durations and file sizes for Laravel, as static methods, helpers and Blade directives.
13.0.0
2026-10-11 18:54 UTC
Requires
- php: >=8.3 <8.6
- illuminate/support: ^13.0
- illuminate/view: ^13.0
- pharaonic/php-readable: ~8.3.2 || ~8.4.2 || ~8.5.2
Requires (Dev)
- laravel/pint: ^1.20
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
- phpstan/phpstan: ^2.1.33
- phpunit/phpunit: ^12.5.8
Suggests
- ext-intl: Required by Readable::getNumberInWords(), readable_number_in_words() and @readableNumberInWords for locales other than English.
Provides
None
Conflicts
None
Replaces
None
README
Readable numbers, dates, durations and file sizes for Laravel.
Powered by PHP Readable.
Installation
composer require pharaonic/laravel-readable
The service provider is registered automatically. There is nothing to publish.
Usage
use Pharaonic\Laravel\Readable\Readable; Readable::getCompactNumber(77700); // "77K" Readable::getDuration(3661); // "1 hour 1 minute 1 second" readable_file_size(1500); // "1.5 KB"
@readableDate($post->published_at) ยท @readableCompactNumber($post->views) views
Documentation
Full documentation: Laravel Readable Documentation.
Support & Security
See SUPPORT.md and SECURITY.md. Contributions are welcome; see CONTRIBUTING.md.
License
MIT. See LICENSE.
