Download the PHP package vdhicts/read-time without Composer
On this page you can find all versions of the php package vdhicts/read-time. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vdhicts/read-time
More information about vdhicts/read-time
Files in vdhicts/read-time
Package read-time
Short Description Laravel package to determine the time required to read a text
License MIT
Homepage https://github.com/vdhicts/read-time
Informations about the package read-time
read-time
Laravel package to determine the read time of a text.
Requirements
This package requires at least Laravel 11+ and PHP 8.2 or newer.
Installation
You can install the package via composer:
composer require vdhicts/read-time
Usage
This package can be used multiple ways. When the content contains HTML, the HTML is stripped before calculating the read time.
Helper
The helper returns the amount of minutes (as integer) it should take for the reader to read the text.
Blade
The blade directive returns the amount of minutes (as integer) it should take for the reader to read the text.
Direct usage
The class offers a bit more functionality.
Custom configuration
Publish the configuration with:
php artisan vendor:publish --provider="Vdhicts\ReadTime\ReadTimeServiceProvider"
Tests
Unit tests are available in the tests
folder. Run with:
composer test
When you want a code coverage report which will be generated in the build/report
folder. Run with:
composer test-coverage
Contribution
Any contribution is welcome, but it should meet the PSR-12 standard and please create one pull request per feature/bug. In exchange, you will be credited as contributor on this page.
Security
If you discover any security related issues in this or other packages of Vdhicts, please email [email protected] instead of using the issue tracker.
Support
If you encounter a problem with this package or has a question about it, feel free to open an issue on GitHub.
License
This package is open-sourced software licensed under the MIT license.
About Vdhicts
Vdhicts is the name of my personal company for which I work as freelancer. Vdhicts develops and implements IT solutions for businesses and educational institutions.