PHPackages                             amylashley/traffic-logger - 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. amylashley/traffic-logger

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

amylashley/traffic-logger
=========================

:package\_description

0.0.1(8y ago)240MITPHPPHP ~5.6|~7.0

Since Aug 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/amylashley/traffic-logger)[ Packagist](https://packagist.org/packages/amylashley/traffic-logger)[ Docs](https://github.com/amylashley/traffic-logger)[ RSS](/packages/amylashley-traffic-logger/feed)WikiDiscussions master Synced 2d ago

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

TrafficLogger
=============

[](#trafficlogger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e47b5fd9742cd16674bc5afeaa5b2f8bbeaffeefff552eff13cdeb1468536d2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f3a76656e646f722f3a7061636b6167655f6e616d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/:vendor/:package_name)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/cb11179311e640818ab161382ab46616c3056e3374c94f90fdc6d06a309cf73b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f3a76656e646f722f3a7061636b6167655f6e616d652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/:vendor/:package_name)[![Coverage Status](https://camo.githubusercontent.com/77bd9748066a4737af2be4a15b71865967905bfc6aa38aabed0996acb7fb2bbb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f3a76656e646f722f3a7061636b6167655f6e616d652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/:vendor/:package_name/code-structure)[![Quality Score](https://camo.githubusercontent.com/5ea237d9c7d6af5499007b76e317965f8bdfa4596fd71c22cd7fe2cb818594cc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f3a76656e646f722f3a7061636b6167655f6e616d652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/:vendor/:package_name)[![Total Downloads](https://camo.githubusercontent.com/2e7d96ffc3c5f08e269c45f38de91ce489968312df30848d817105c5ada0d9cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f3a76656e646f722f3a7061636b6167655f6e616d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/:vendor/:package_name)

Laravel package that will log certain traffic data to a MySQL database. This package relies on the Eloquent ORM which is included with Laravel.

Install
-------

[](#install)

\######Via Composer

```
$ composer require amylashley/traffic-logger
```

Add ServiceProvider to app.php

```
AmyLashley\TrafficLogger\App\Providers\TrafficLoggerServiceProvider::class,

```

Publish config and migration to your app:

```
php artisan vendor:publish --provider="AmyLashley\TrafficLogger\App\Providers\TrafficLoggerServiceProvider"

```

\######Migrate the database. You can change the database table that the logger users by update the table-name variable in the trafficlog.php config file.

```
php artisan migrate

```

\######Add Middleware to your `app\Http\Kernel.php` in the global middleware array:

```
\AmyLashley\TrafficLogger\App\Http\Middleware\LogRequest::class,

```

\##Configuration

The following can be configured in trafficlog.php:

-table-name: change the name of the database table that TrafficLogger will use. The default value is "log" -impersonator: If your system uses impersonation, and you'd like to capture the id of the impersonator, you'll need to add this functionality to your system: add a session variable and populate it when your system authenticates the user being impersonated. Then you can use this variable in TrafficLogger. The default value is "auth\_imitator".

Usage
-----

[](#usage)

You can view your traffic reports at /admin/traffic-logger/report

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Amy Lashley](https://github.com/amylashley)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

3192d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0eb86f4e0a6d38d927598a8e98b70051a267a4acc030c2cc75a99fa44d21bdea?d=identicon)[amylashley](/maintainers/amylashley)

---

Tags

laravel loggeramylashleytrafficlogger

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/amylashley-traffic-logger/health.svg)

```
[![Health](https://phpackages.com/badges/amylashley-traffic-logger/health.svg)](https://phpackages.com/packages/amylashley-traffic-logger)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[jeremykenedy/laravel-logger

Laravel Logger Package

584288.4k1](/packages/jeremykenedy-laravel-logger)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)

PHPackages © 2026

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