Download the PHP package sl-projects/laravel-request-logger without Composer

On this page you can find all versions of the php package sl-projects/laravel-request-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-request-logger

Laravel Request Logger

Latest Version codecov PHP Version Laravel Version

A high-performance Laravel package for logging and analyzing HTTP requests with minimal overhead. Built with a cache-first approach and normalized database structure for efficient storage and querying.

NOTE: This package has no connection with the Laravel framework or its creators. It is an independent project developed by Sofiane Lasri, mainly for educational purposes.

Table of Contents

Features

Requirements

Installation

Install the package via Composer:

Run the migrations to create the necessary database tables:

(Optional) Publish the configuration file for customization:

Configuration

For Laravel 11+ (New Structure)

Laravel 11 introduced a new application structure with simplified configuration. Here's how to set up the package:

1. Register Middleware

In bootstrap/app.php:

2. Schedule the Command

In routes/console.php:

For Laravel 10 and Earlier

For Laravel versions 10 and below, use the traditional configuration approach:

1. Register Middleware

In app/Http/Kernel.php:

2. Schedule the Command

In app/Console/Kernel.php:

Usage

Basic Usage

Once configured, the package automatically logs all incoming requests. The middleware captures request data in the terminate() method to ensure zero impact on response times.

Selective Logging

Apply middleware to specific routes only:

Manual Processing

Process cached requests manually without waiting for the scheduler:

Querying Logged Requests

Advanced Features

Configuration Options

After publishing the config file, you can customize:

Custom Processing

Create custom processors for specific request types:

Event Listeners

The package dispatches events you can listen to:

Database Schema

The package uses a normalized database structure for optimal performance:

Tables

Indexes

All foreign key columns and frequently queried fields are properly indexed for optimal query performance.

Performance Considerations

Cache Strategy

Optimization Tips

  1. Use Redis/Memcached: File-based cache can be slow under high load
  2. Adjust Batch Size: Larger batches reduce database calls but use more memory
  3. Schedule Frequency: Run save:requests more frequently under high traffic
  4. Database Indexes: Ensure all foreign keys are properly indexed
  5. Pruning Old Data: Regularly clean old records to maintain performance

Testing

Run the test suite:

Run static analysis:

The package includes comprehensive tests for:

Contributing

Contributions are welcome! Since this is my first package, I would appreciate any feedback, suggestions, or improvements you can provide.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure all tests pass and add tests for new features.

License

This package is open-source software licensed under the MIT license.

Author

Developed by Sofiane Lasri.

For any inquiries or suggestions, feel free to create an issue on GitHub.


All versions of laravel-request-logger with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sl-projects/laravel-request-logger contains the following files

Loading the files please wait ....