PHPackages                             vanlinhha/robots-counter - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. vanlinhha/robots-counter

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

vanlinhha/robots-counter
========================

Count and report how many times a bot visit your website

1.0.2(6y ago)0111MITPHP

Since Dec 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/vanlinhha/robots-counter)[ Packagist](https://packagist.org/packages/vanlinhha/robots-counter)[ RSS](/packages/vanlinhha-robots-counter/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Robots counter
==============

[](#robots-counter)

This package allow you to track how many bots visit your website, their frequency and time execution for each request.

### Installation

[](#installation)

In your project folder, run

`composer require vanlinhha/robots-counter`

Aftef finish, publish vendor by this command:

`php artisan vendor:publish --provider="LinhHa\RobotsCounter\RobotsCounterServiceProvider"`

and `php artisan migrate` to run migration file

### Usage Instructions

[](#usage-instructions)

This package works by using a middleware, logging every request performed by bots in a log file, you can rename the middleware in `config/robots_counter.php` file.

If you want the middleware works for every request, just put its class `\LinhHa\RobotsCounter\Middleware\RobotsCounterMiddleware::class` in array `$middleware ` in `app/Http/Kernel.php`But the best practise is using this middleware for routes need reporting for better performance. Also, you can config your accepted request methods you want to be in your log.

Logs are saved to database by command `robot:report`, this command is scheduled to run everyday. You can use it to make report for specific day, use `php artisan robot:report --help` to see usage.

We provide a route named `api.robots.counter` so you can easily make a report from it. This route uses GET method and accepts 3 parameters:
`bot` : bot name you want to make report
`range`: Range time you want to make report, `m` for last 30 days and `w` for last 7 days, the default value is `w`.
`type`: Report by day or by hour, `day` for by day and `hour` for by hour, default is `hour`.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

4

Last Release

2340d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/vanlinhha-robots-counter/health.svg)

```
[![Health](https://phpackages.com/badges/vanlinhha-robots-counter/health.svg)](https://phpackages.com/packages/vanlinhha-robots-counter)
```

###  Alternatives

[pragmarx/tracker

A Laravel Visitor Tracker

2.9k300.0k1](/packages/pragmarx-tracker)

PHPackages © 2026

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