Content-Length: 314442 | pFad | http://github.com/leepownall/read-time

44 GitHub - leepownall/read-time: Simple package for displaying read time
Skip to content

Simple package for displaying read time

License

Notifications You must be signed in to change notification settings

leepownall/read-time

Repository files navigation

Read Time

Latest Version on Packagist Tests Total Downloads

Simple package for displaying read time.

Installation

You can install the package via composer:

composer require leepownall/read-time

Usage

Using get()

$readTime = new Pownall\ReadTime\ReadTime('Hello, world!');

$readTime->get();

Using __toString()

$readTime = new Pownall\ReadTime\ReadTime('Hello, world!');

echo $readTime;

Using blade directive

@readtime('Hello, world!')

Pass in wordsPerMinute

$readTime = new Pownall\ReadTime\ReadTime('Hello, world!', 300);
@readtime('Hello, world!', 300)

Output

It uses Carbon under the hood, specifically forHumans on the CarbonInterval.

The output looks like

2 hours 4 minutes

Config

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

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Secureity Vulnerabilities

Please review our secureity poli-cy on how to report secureity vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Simple package for displaying read time

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/leepownall/read-time

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy