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 1w 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 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

2283d 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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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