PHPackages                             landrok/laravel-request-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. [Database &amp; ORM](/categories/database)
4. /
5. landrok/laravel-request-logger

ActiveLibrary[Database &amp; ORM](/categories/database)

landrok/laravel-request-logger
==============================

A Laravel middleware to log HTTP requests into database.

1.1.0(1y ago)2144MITPHPPHP &gt;=8.2

Since Jan 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/landrok/laravel-request-logger)[ Packagist](https://packagist.org/packages/landrok/laravel-request-logger)[ Docs](https://github.com/landrok/laravel-request-logger)[ RSS](/packages/landrok-laravel-request-logger/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

Laravel Request Logger
======================

[](#laravel-request-logger)

[![Build Status](https://camo.githubusercontent.com/d59999061cadfbcfdbf5cb5e09522e347c7412a3e2b8fdbc06ce9875ebadcc49/68747470733a2f2f7472617669732d63692e636f6d2f6c616e64726f6b2f6c61726176656c2d726571756573742d6c6f676765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/landrok/laravel-request-logger)[![Test Coverage](https://camo.githubusercontent.com/5e28adb3f659c384cb1957c272d0e76cd1fd5177a71c4a00f3d95c66d5e14d6a/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c616e64726f6b2f6c61726176656c2d726571756573742d6c6f676765722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/landrok/laravel-request-logger/coverage)[![Code Climate](https://camo.githubusercontent.com/ed6dc07bba61ee726db9b5b1cf9db204c6682b27950d11dfc40ef317cc44842c/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c616e64726f6b2f6c61726176656c2d726571756573742d6c6f676765722f6261646765732f6770612e737667)](https://codeclimate.com/github/landrok/laravel-request-logger)

Laravel Request Logger provides a middleware that logs HTTP requests into a table.

It can be reconfigured to target specific requests or to log only specified informations.

What is logged ?
----------------

[](#what-is-logged-)

For each request, the following informations are stored.

**User**

- session\_id
- user\_id
- ip
- route
- route\_params: optional

**Performances**

- duration
- mem\_alloc

**HTTP stuff**

- method
- status\_code
- url: this one has 2 ways of configuration: set it to `full` to log full URL with query or set it to `true` to log only URL
- referer
- referer\_host
- request\_headers: optional
- response\_headers: optional

**Device**

The following values are provided by the `jenssegers/agent` package.

- device
- os
- os\_version
- browser
- browser\_version
- is\_desktop
- is\_mobile
- is\_tablet
- is\_phone
- is\_robot
- robot\_name
- user\_agent

**Miscellaneous**

- meta : this field is for custom logging. See RequestLogger::meta($value)
- created\_at

---

Table of contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [License](#license)

---

Requirements
------------

[](#requirements)

Laravel Request Logger supports Laravel 6, 7, 8.

---

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

[](#installation)

```
composer require landrok/laravel-request-logger

```

Create the `request_logs` table with

```
php artisan migrate

```

---

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

[](#configuration)

You may log every calls (default), only routes that match some patterns and only specified criterias.

You have to publish configuration file before.

`php artisan vendor:publish --provider="Landrok\Laravel\RequestLogger\RequestLoggerServiceProvider"`

The config file can be found at `config/requestlogger.php`.

---

Meta::set(string $key, $value)
------------------------------

[](#metasetstring-key-value)

This tool is made to log anything from anywhere in your code (Controller, View, Service, etc...) into the `meta` column.

```
use Landrok\Laravel\RequestLogger\Meta;

Meta::set($key, $value);
```

`$value` can be a string or an array or a serializable. It will be stored as a JSON string.

Before using this method, you have to authorize this field in the config file.

---

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

[](#contributing)

Feel free to open issues and make PR. Contributions are welcome.

---

License
-------

[](#license)

Laravel Request License is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance40

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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 ~358 days

Total

5

Last Release

499d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.1

1.1.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/04ee1be59b281d31a2d48077a359052060f53baf7409cd1be97fe54ad4e7eb51?d=identicon)[landrok](/maintainers/landrok)

---

Top Contributors

[![landrok](https://avatars.githubusercontent.com/u/3310446?v=4)](https://github.com/landrok "landrok (23 commits)")

---

Tags

laraveldatabaseloggerperformances

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/landrok-laravel-request-logger/health.svg)

```
[![Health](https://phpackages.com/badges/landrok-laravel-request-logger/health.svg)](https://phpackages.com/packages/landrok-laravel-request-logger)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[mvanduijker/laravel-transactional-model-events

Add eloquent model events fired after a transaction is committed or rolled back

75164.5k](/packages/mvanduijker-laravel-transactional-model-events)[guidocella/eloquent-populator

Guess attributes for Eloquent model factories

7661.6k2](/packages/guidocella-eloquent-populator)[gearbox-solutions/eloquent-filemaker

A package for getting FileMaker records as Eloquent models in Laravel

6454.8k2](/packages/gearbox-solutions-eloquent-filemaker)

PHPackages © 2026

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