PHPackages                             somarkn99/estimated-reading-time - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. somarkn99/estimated-reading-time

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

somarkn99/estimated-reading-time
================================

A simple package to calculate and display estimated reading time in both Arabic and English.

v1.0.0(1y ago)681MITPHPPHP &gt;=7.4

Since Jun 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/somarkn99/Estimated-reading-time)[ Packagist](https://packagist.org/packages/somarkn99/estimated-reading-time)[ RSS](/packages/somarkn99-estimated-reading-time/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Estimated Reading Time
======================

[](#estimated-reading-time)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5d92b266e100451ed7f8993399e032d8170fb5ba1dfa691a420f447b19265f26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6d61726b6e39392f657374696d617465642d72656164696e672d74696d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/somarkn99/estimated-reading-time)[![Total Downloads](https://camo.githubusercontent.com/89dcc91926925260c90ee14e49799220405d70cbddaf16ccf91b52b80e355cdc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6d61726b6e39392f657374696d617465642d72656164696e672d74696d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/somarkn99/estimated-reading-time)

This package provides a simple way to calculate and display the estimated reading time for content in both Arabic and English.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require somarkn99/estimated-reading-time
```

[A Wordpress version of this package is available as a plugin here](https://wordpress.org/plugins/arabic-english-estimated-reading-time/)

Usage
-----

[](#usage)

### Service Provider

[](#service-provider)

Add the service provider to the `providers` array in `config/app.php`:

```
'providers' => [
    // Other Service Providers
    Somarkn99\EstimatedReadingTime\EstimatedReadingTimeServiceProvider::class,
],
```

### Configuration

[](#configuration)

You can publish the configuration file using this command:

```
php artisan vendor:publish --provider="Somarkn99\EstimatedReadingTime\EstimatedReadingTimeServiceProvider" --tag="config"
```

This will publish the `estimatedreadingtime.php` configuration file to the `config` directory.

### Blade Directive

[](#blade-directive)

You can use the Blade directive to display the estimated reading time in your views:

```
@readingtime($content, 'en')
```

Or for Arabic content:

```
@readingtime($content, 'ar')
```

### Directly Using the Main Class

[](#directly-using-the-main-class)

You can directly call the `calculate` method from the `EstimatedReadingTime` class in your controllers, commands, or other parts of your application:

```
use Somarkn99\EstimatedReadingTime\EstimatedReadingTime;

$readingTime = EstimatedReadingTime::calculate($content, 'en');
```

### API Usage

[](#api-usage)

If you prefer to use an API to get the estimated reading time, you can use the provided endpoint.

#### Define the Route

[](#define-the-route)

Ensure the route is loaded by including it in your `routes/api.php`:

```
Route::prefix('api')->group(function () {
    require base_path('vendor/somarkn99/estimated-reading-time/src/routes/api.php');
});
```

#### Make a Request

[](#make-a-request)

Send a `POST` request to `/api/reading-time` with the content and language in the request body.

**Request:**

```
POST /api/reading-time
Content-Type: application/json

{
    "content": "Your article content goes here...",
    "lang": "en"
}
```

**Response:**

```
{
    "reading_time": "Estimated Time of Reading: 3 Min"
}
```

### Configuration Options

[](#configuration-options)

You can customize the package by modifying the configuration options:

```
return [
    'ar_prefix' => 'الوقت المقدر للقراءة: ',
    'ar_suffix_s' => 'دقيقة',
    'ar_suffix_p' => 'دقائق',
    'en_prefix' => 'Estimated Time of Reading: ',
    'en_suffix' => 'Min',
    'en_wpm' => 300,
    'ar_wpm' => 250,
    'exclude_images' => true,
];
```

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Somar Kesen](https://github.com/somarkn99)
- [Abdoo Mayhob](https://abdoo.me)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

693d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe7dcc91c20617cded37a29c62a453957d062954b62ff058f03bece8b5e0bbb6?d=identicon)[somarkn99](/maintainers/somarkn99)

---

Top Contributors

[![somarkn99](https://avatars.githubusercontent.com/u/44697004?v=4)](https://github.com/somarkn99 "somarkn99 (2 commits)")[![Abdoo-mayhob](https://avatars.githubusercontent.com/u/79149812?v=4)](https://github.com/Abdoo-mayhob "Abdoo-mayhob (1 commits)")

---

Tags

laravelpackageenglisharabicreading-timeestimated reading time

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/somarkn99-estimated-reading-time/health.svg)

```
[![Health](https://phpackages.com/badges/somarkn99-estimated-reading-time/health.svg)](https://phpackages.com/packages/somarkn99-estimated-reading-time)
```

###  Alternatives

[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[maherelgamil/arabicdatetime

Easy and useful tool to generate arabic or hijri date with multi-language support for laravel

414.5k](/packages/maherelgamil-arabicdatetime)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
