PHP code example of logiek / laravel-reading-time
1. Go to this page and download the library: Download logiek/laravel-reading-time library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
logiek / laravel-reading-time example snippets
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.');
bash
php artisan vendor:publish --provider="Logiek\ReadingTime\ReadingTimeServiceProvider" --tag="config"