PHPackages                             roky/laravel-route-analytics - 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. roky/laravel-route-analytics

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

roky/laravel-route-analytics
============================

Dead-simple route usage tracking for Laravel — find unused and slow routes in minutes.

v1.0.0(1mo ago)00MITPHPPHP ^8.2

Since Jun 4Pushed 1mo agoCompare

[ Source](https://github.com/roky484812/laravel-route-analytics)[ Packagist](https://packagist.org/packages/roky/laravel-route-analytics)[ RSS](/packages/roky-laravel-route-analytics/feed)WikiDiscussions main Synced 1w ago

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

Laravel Route Analytics
=======================

[](#laravel-route-analytics)

Dead-simple route usage tracking for Laravel — find unused and slow routes in minutes.

Features
--------

[](#features)

- 🚀 **Zero configuration** - Works out of the box
- 📊 **Beautiful dashboard** - Clean, responsive UI with filtering and sorting
- 🔍 **Find unused routes** - Identify routes that are never hit
- ⚡ **Track performance** - Monitor average and max response times
- 🛠️ **CLI commands** - Automate reporting and maintenance
- 💾 **Minimal overhead** - Lightweight database storage with atomic updates

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

[](#installation)

```
composer require roky/laravel-route-analytics
php artisan migrate
```

That's it! Visit `/route-analytics` to see your dashboard.

Dashboard
---------

[](#dashboard)

Access the analytics dashboard at `/route-analytics`:

- **Overview stats**: Tracked routes, total hits, unused routes
- **Sortable table**: Click column headers to sort
- **Filters**: All, Unused, Slow (&gt;200ms)
- **Real-time data**: Automatically updates as traffic flows

CLI Commands
------------

[](#cli-commands)

### View top routes

[](#view-top-routes)

```
php artisan route:analytics:report
```

### Find unused routes

[](#find-unused-routes)

```
php artisan route:analytics:report --unused
```

### Find slow routes

[](#find-slow-routes)

```
php artisan route:analytics:report --slow=200
```

### Clear all data

[](#clear-all-data)

```
php artisan route:analytics:flush
```

### Prune old data

[](#prune-old-data)

```
php artisan route:analytics:prune --days=90
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=route-analytics-config
```

Available options in `config/route-analytics.php`:

```
return [
    'enabled' => true,                  // Enable/disable tracking
    'driver' => 'database',             // Storage driver
    'table' => 'route_analytics',       // Database table name
    'middleware' => ['web'],            // Dashboard middleware
    'path' => 'route-analytics',        // Dashboard path
];
```

### Protect the Dashboard

[](#protect-the-dashboard)

Add authentication to the dashboard:

```
'middleware' => ['web', 'auth'],
```

How It Works
------------

[](#how-it-works)

1. Middleware intercepts every request and records route key, duration, and timestamp
2. Data is aggregated in the database (hits, average/max/min times)
3. Dashboard and CLI commands read from the aggregated data
4. Minimal performance impact - single atomic DB write per request

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelmonitoringroutesperformanceanalytics

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/roky-laravel-route-analytics/health.svg)

```
[![Health](https://phpackages.com/badges/roky-laravel-route-analytics/health.svg)](https://phpackages.com/packages/roky-laravel-route-analytics)
```

###  Alternatives

[jackwh/laravel-new-relic

Monitor your Laravel application performance with New Relic

113980.0k](/packages/jackwh-laravel-new-relic)

PHPackages © 2026

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