Download the PHP package mohsen-mhm/laravel-tracking without Composer
On this page you can find all versions of the php package mohsen-mhm/laravel-tracking. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mohsen-mhm/laravel-tracking
More information about mohsen-mhm/laravel-tracking
Files in mohsen-mhm/laravel-tracking
Package laravel-tracking
Short Description A tracking package for Laravel applications
License MIT
Informations about the package laravel-tracking
Laravel Request Tracker
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
- 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
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:
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
-
Install the package via Composer:
-
Publish the configuration file:
-
Publish the migrations:
-
Run the migrations:
- Publish the views (optional):
Configuration
The configuration file (config/tracking.php) allows you to control the package's behavior:
Usage
Middleware
The TrackRequests middleware handles request logging. You can add it to your middleware stack:
Accessing the Logs
Visit the route defined in the configuration (route_url) to view the logs. For example:
Publishing Migrations
To customize the database schema for logging, publish and modify the migrations:
Customizing the Route
You can change the route URL in the configuration file:
Access the logs at:
Custom IP Resolution
You can define your own IP resolution logic by setting a callback in your config/tracking.php:
License
This package is open-source software licensed under the MIT license.
All versions of laravel-tracking with dependencies
illuminate/support Version ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0
doctrine/dbal Version ^3.6 || ^4.2 || ^4.4