| Package Data | |
|---|---|
| Maintainer Username: | amylashley |
| Maintainer Contact: | alashley@amherst.edu (:Amy Lashley) |
| Package Create Date: | 2017-08-16 |
| Package Last Update: | 2017-09-07 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-27 03:01:57 |
| Package Statistics | |
|---|---|
| Total Downloads: | 40 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 2 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Laravel package that will log certain traffic data to a MySQL database. This package relies on the Eloquent ORM which is included with Laravel.
######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".
You can view your traffic reports at /admin/traffic-logger/report
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email alashley@amherst.edu instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.