laravel-reading-time maintained by logiek
⚠️ THIS PACKAGE IS NO LONGER MAINTAINED ⚠️
This repository has been discontinued and is no longer receiving updates or support.
laravel-reading-time
This package makes it easy to calculate the estimated reading time for a given piece of content with Laravel.
Installation
You can install the package via Composer:
composer require logiek/laravel-reading-time
The package will automatically register itself. Optionally you can publish the config file with:
php artisan vendor:publish --provider="Logiek\ReadingTime\ReadingTimeServiceProvider" --tag="config"
Usage
use Logiek\ReadingTime\ReadingTime;
echo (new ReadingTime())->slow('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
// Using the container
echo app(ReadingTime::class)->average('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
// Using the helper
echo reading_time()->fast('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
echo reading_time('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
Changelog
Please see the CHANGELOG for more information about recent changes.
License
This project is open-sourced software licensed under the MIT license.