PHPackages                             luqta/viewcount - 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. luqta/viewcount

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

luqta/viewcount
===============

The package enables you to calculate the view count of a resource

v2.0(6y ago)071MITPHPCI failing

Since Feb 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/3bdullahg97/ViewCount)[ Packagist](https://packagist.org/packages/luqta/viewcount)[ Docs](https://github.com/3bdullahg97/viewcount)[ RSS](/packages/luqta-viewcount/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (6)Versions (10)Used By (0)

ViewCount
=========

[](#viewcount)

The package enables you to calculate the view count of a resource (MongoDB Collection).

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

[](#installation)

1. Via Composer

```
$ composer require luqta/viewcount
```

2. Validate `vistor_ip`

```
'user_id' => 'string',
'countable' => 'required|boolean',
'vistor_ip' => 'required_if:countable,1|string',
'user_agent' => 'required_if:countable,1|string',
'browser_language' => 'required_if:countable,1|string',
'screen.width' => 'required_if:countable,1|numeric',
'screen.height' => 'required_if:countable,1|numeric',
'inner.width' => 'required_if:countable,1|numeric',
'inner.height' => 'required_if:countable,1|numeric',

```

3. Add `view_count` field to your resource collection.

```
protected $fillable = [
    ...
    'view_count',
    ...
];

```

4. Dispatch `Luqta\ViewCount\ViewCountJob` job in your resource controller.

```
dispatch(new ViewCountJob($model, $request->validated()));

```

5. Use `Luqta\ViewCount\Traits\Countable` trait in your resource model.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~1 days

Total

9

Last Release

2329d ago

Major Versions

v0.4 → v1.02020-02-12

v1.3 → v2.02020-02-16

### Community

Maintainers

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

---

Top Contributors

[![X01AQR](https://avatars.githubusercontent.com/u/32797179?v=4)](https://github.com/X01AQR "X01AQR (2 commits)")

---

Tags

laravelViewCount

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luqta-viewcount/health.svg)

```
[![Health](https://phpackages.com/badges/luqta-viewcount/health.svg)](https://phpackages.com/packages/luqta-viewcount)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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