pownall/read-time is a Laravel package for simple package for displaying read time.
It currently has 2 GitHub stars and 15 downloads on Packagist (latest version 1.0.0).
Install it with composer require pownall/read-time.
Discover more Laravel packages by pownall
or browse all Laravel packages to compare alternatives.
Last updated
Simple package for displaying read time.
You can install the package via composer:
composer require leepownall/read-time
get()$readTime = new Pownall\ReadTime\ReadTime('Hello, world!');
$readTime->get();
__toString()$readTime = new Pownall\ReadTime\ReadTime('Hello, world!');
echo $readTime;
@readtime('Hello, world!')
wordsPerMinute$readTime = new Pownall\ReadTime\ReadTime('Hello, world!', 300);
@readtime('Hello, world!', 300)
It uses Carbon under the hood, specifically forHumans on the CarbonInterval.
The output looks like
2 hours 4 minutes
Default wordsPerMinute is 200. You can override this by passing it in, or publish the config and override there.
php artisan vendor:publish --tag=readtime-config
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.