PHPackages                             mohsen-mhm/laravel-tracking - 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. mohsen-mhm/laravel-tracking

ActiveLibrary

mohsen-mhm/laravel-tracking
===========================

A tracking package for Laravel applications

2.3.1(6mo ago)11.7kMITBladePHP ^8.0

Since Dec 13Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Mohsen-mhm/laravel-tracking)[ Packagist](https://packagist.org/packages/mohsen-mhm/laravel-tracking)[ RSS](/packages/mohsen-mhm-laravel-tracking/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (25)Used By (0)

Laravel Request Tracker
=======================

[](#laravel-request-tracker)

Introduction
------------

[](#introduction)

The **Laravel Request Tracker** package provides an easy way to log incoming HTTP requests, including metadata like headers, body, user details, and responses. It supports dynamic configuration for themes, logging preferences, and route customization.

Features
--------

[](#features)

- Logs user details, headers, body, and response.
- Tracks IP address and User-Agent.
- Configurable logging options.
- Supports Bootstrap and Tailwind CSS themes for the log viewer. (soon)
- Route URL customization.
- Migration publishing for database setup.

---

Compatibility
-------------

[](#compatibility)

### Laravel Version Support

[](#laravel-version-support)

> **This package supports Laravel 9 and above.**

We ensure compatibility with the latest Laravel versions while maintaining support for older versions starting from Laravel 9.

To install the package in your Laravel project, make sure you have `PHP 8.0` or above and run:

```
composer require mohsen-mhm/laravel-tracking
```

For Laravel 9, the package ensures compatibility by leveraging `doctrine/dbal` version `^3.x`. For Laravel 10 and 11, the package uses `doctrine/dbal` version `^4.x`. These are dynamically managed based on your Laravel version.

---

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

[](#installation)

1. Install the package via Composer:

    ```
    composer require mohsen-mhm/laravel-tracking
    ```
2. Publish the configuration file:

    ```
    php artisan vendor:publish --tag=tracker-configs
    ```
3. Publish the migrations:

    ```
    php artisan vendor:publish --tag=tracker-migrations
    ```
4. Run the migrations:

    ```
    php artisan migrate
    ```
5. Publish the views (optional):

    ```
    php artisan vendor:publish --tag=tracker-views
    ```

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

[](#configuration)

The configuration file (`config/tracking.php`) allows you to control the package's behavior:

Usage
-----

[](#usage)

### Middleware

[](#middleware)

The `TrackRequests` middleware handles request logging. You can add it to your middleware stack:

```
protected $middleware = [
    \MohsenMhm\LaravelTracking\Http\Middleware\TrackRequests::class,
];
```

### Accessing the Logs

[](#accessing-the-logs)

Visit the route defined in the configuration (`route_url`) to view the logs. For example:

```
http://your-app.test/request-logs

```

Publishing Migrations
---------------------

[](#publishing-migrations)

To customize the database schema for logging, publish and modify the migrations:

```
php artisan vendor:publish --tag=tracker-migrations
```

Customizing the Route
---------------------

[](#customizing-the-route)

You can change the route URL in the configuration file:

```
'route_url' => 'custom-log-url',
```

Access the logs at:

```
http://your-app.test/custom-log-url

```

Custom IP Resolution
--------------------

[](#custom-ip-resolution)

You can define your own IP resolution logic by setting a callback in your `config/tracking.php`:

```
'ip_resolver' => function (Request $request) {
    return $request->header('X-Forwarded-For') ?? $request->ip();
},
```

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance67

Regular maintenance activity

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Every ~16 days

Recently: every ~38 days

Total

21

Last Release

196d ago

Major Versions

1.4.0 → 2.0.02024-12-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7891a1269e2d058cae6f43ce453ca6716c0d4e9aef74ac5ab3d4c454c43b14d?d=identicon)[Mohsen-mhm](/maintainers/Mohsen-mhm)

---

Top Contributors

[![Mohsen-mhm](https://avatars.githubusercontent.com/u/67678628?v=4)](https://github.com/Mohsen-mhm "Mohsen-mhm (58 commits)")

### Embed Badge

![Health badge](/badges/mohsen-mhm-laravel-tracking/health.svg)

```
[![Health](https://phpackages.com/badges/mohsen-mhm-laravel-tracking/health.svg)](https://phpackages.com/packages/mohsen-mhm-laravel-tracking)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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