logiek / laravel-reading-time
This package makes it easy to calculate the estimated reading time for a given piece of content with Laravel.
1.1.0
2023-08-10 17:06 UTC
Requires
- php: ^8.0|^8.1|^8.2
- illuminate/config: ^8.0|^9.0|^10.0
- illuminate/support: ^8.0|^9.0|^10.0
- laravel/helpers: ^1.4|^1.5|^1.6
- nesbot/carbon: ^2.54
This package is auto-updated.
Last update: 2024-11-10 19:47:32 UTC
README
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.