PHPackages                             shoesten-tag/log-http - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. shoesten-tag/log-http

ActivePackage[HTTP &amp; Networking](/categories/http)

shoesten-tag/log-http
=====================

Log HTTP requests and responses in Laravel applications using PHP attributes

v0.1.1(8mo ago)36MITPHPPHP ^8.1CI passing

Since Nov 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/roes10/log-http)[ Packagist](https://packagist.org/packages/shoesten-tag/log-http)[ RSS](/packages/shoesten-tag-log-http/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (0)

Log-http
========

[](#log-http)

Log HTTP requests and responses in Laravel applications using PHP attributes.

How to install
==============

[](#how-to-install)

```
composer require shoesten-tag/log-http --dev
```

Notes
=====

[](#notes)

- The default setting for both request and response logging is false. You can enable both by setting them to true or enable only one of them as needed.
- Currently, logging is done only in the Laravel log file. However, if you change the logging channel, logs will be sent to the specified channel instead.
- **Not recommended for production use**!

How to use
==========

[](#how-to-use)

Add middleware to your routes

```
//Example
Route::resource('/dashboard', DashboardController::class)->middleware('log-http');
```

Log the response within the method
----------------------------------

[](#log-the-response-within-the-method)

```
  #[Intercept(response: true)]
    public function index(){
        return new Collection(Employee::all());
    }
```

Log the request within the method
---------------------------------

[](#log-the-request-within-the-method)

```
  #[Intercept(request: true)]
    public function index(){
        return new Collection(Employee::all());
    }
```

Enable logging of requests and responses within the class
---------------------------------------------------------

[](#enable-logging-of-requests-and-responses-within-the-class)

```
#[Intercept(request: true, response: true)]
class EmployeeController extends Controller
{
     public function index(){
        return new Collection(Employee::all());
    }
}

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance76

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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

Total

2

Last Release

258d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e0e007b78929e59596b96d2298d807f08d9156c959440d4c640dbffb39f1f97?d=identicon)[shoesten-tag](/maintainers/shoesten-tag)

---

Top Contributors

[![roes10](https://avatars.githubusercontent.com/u/30882168?v=4)](https://github.com/roes10 "roes10 (2 commits)")

---

Tags

httpmiddlewarelaravelloggingmonitoringdebugphp-attributesrequest loggingapi-loggingresponse-logginghttp-interceptor

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/shoesten-tag-log-http/health.svg)

```
[![Health](https://phpackages.com/badges/shoesten-tag-log-http/health.svg)](https://phpackages.com/packages/shoesten-tag-log-http)
```

###  Alternatives

[matthewbdaly/laravel-etag-middleware

A Laravel middleware for adding ETags to HTTP requests to improve response times

64326.0k2](/packages/matthewbdaly-laravel-etag-middleware)[tomschlick/request-migrations

HTTP Request Migrations

1844.5k](/packages/tomschlick-request-migrations)[middlewares/access-log

Middleware to generate access logs

20121.2k2](/packages/middlewares-access-log)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)

PHPackages © 2026

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