PHPackages                             jaleeldgk/laravel-access-logs - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jaleeldgk/laravel-access-logs

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

jaleeldgk/laravel-access-logs
=============================

A Laravel package for logging user requests, best way to log all requests for debugging purpose.

v1.1.0(2y ago)287MITPHPPHP ^7.3|^8.0

Since Jun 19Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/jaleeldgk/laravel-access-logs)[ Packagist](https://packagist.org/packages/jaleeldgk/laravel-access-logs)[ RSS](/packages/jaleeldgk-laravel-access-logs/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

Laravel Access Logs
===================

[](#laravel-access-logs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3a855b7bef957c7e0a65d0188bbdaf1bfc1f3c8d92ee52e0ea53efb814d08bad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616c65656c64676b2f6c61726176656c2d6163636573732d6c6f67732e737667)](https://packagist.org/packages/jaleeldgk/laravel-access-logs)[![Total Downloads](https://camo.githubusercontent.com/e15dde822e46e006d5c96bc3ed51d8e9bd933e88bf6a896cd2ce8aec437f47a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616c65656c64676b2f6c61726176656c2d6163636573732d6c6f67732e737667)](https://packagist.org/packages/jaleeldgk/laravel-access-logs)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

A Laravel package for logging user requests and activities. Captures URLs, request parameters, IP addresses, user agents, response statuses, and more — ideal for debugging and auditing.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Manual Logging](#manual-logging)
    - [Automatic Logging via Middleware](#automatic-logging-via-middleware)
- [Testing](#testing)
- [Author](#author)
- [License](#license)

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

[](#installation)

Install the package via Composer:

```
composer require jaleeldgk/laravel-access-logs
```

Publish the config file and run the migration:

```
php artisan vendor:publish --provider="Jaleeldgk\LaravelAccessLogs\LaravelAccessLogsServiceProvider" --tag="config"
php artisan migrate
```

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

[](#configuration)

After publishing, the config file is located at `config/laravel-access-logs.php`. You can toggle which fields are logged:

```
return [
    'log_user_id'       => true,   // Log the authenticated user ID
    'log_ip'            => true,   // Log the client IP address
    'log_user_agent'    => true,   // Log the User-Agent header
    'log_params'        => true,   // Log request parameters (JSON)
    'log_error_message' => true,   // Log error messages
    'log_error_trace'   => true,   // Log error stack traces
    'log_referral'      => true,   // Log the Referer header
    'log_feedback'      => true,   // Log custom feedback
];
```

Usage
-----

[](#usage)

### Manual Logging

[](#manual-logging)

You can manually create a log entry from anywhere in your application:

```
use Jaleeldgk\LaravelAccessLogs\Helpers\LogHelper;

// Log with default request data
LogHelper::createLog();

// Log with additional custom data
LogHelper::createLog([
    'error_message' => 'Something went wrong',
    'feedback'      => 'User reported issue',
]);
```

### Automatic Logging via Middleware

[](#automatic-logging-via-middleware)

Register the middleware in your route middleware or globally in `app/Http/Kernel.php`:

```
protected $routeMiddleware = [
    'access.log' => \Jaleeldgk\LaravelAccessLogs\Middleware\AccessLogMiddleware::class,
];
```

Then apply it to your routes or route groups:

```
Route::middleware(['access.log'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index']);
});
```

> **Note:** The middleware captures the authenticated user and response status, but you still need to call `LogHelper::createLog()` where appropriate (e.g., in exception handlers or after-response callbacks).

Testing
-------

[](#testing)

Run the test suite with PHPUnit:

```
./vendor/bin/phpunit
```

Author
------

[](#author)

**Jaleel Ahmad**

- Email:
- GitHub: [github.com/jaleeldgk](https://github.com/jaleeldgk)

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance55

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

746d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/71930490?v=4)[Jaleel Ahmad](/maintainers/jaleeldgk)[@jaleeldgk](https://github.com/jaleeldgk)

---

Top Contributors

[![jaleeldgk](https://avatars.githubusercontent.com/u/71930490?v=4)](https://github.com/jaleeldgk "jaleeldgk (9 commits)")

### Embed Badge

![Health badge](/badges/jaleeldgk-laravel-access-logs/health.svg)

```
[![Health](https://phpackages.com/badges/jaleeldgk-laravel-access-logs/health.svg)](https://phpackages.com/packages/jaleeldgk-laravel-access-logs)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M307](/packages/laravel-horizon)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299582.7k1](/packages/larabug-larabug)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

65108.9k](/packages/masterro-laravel-mail-viewer)[spatie/laravel-flare

Send Laravel errors to Flare

111.4M7](/packages/spatie-laravel-flare)

PHPackages © 2026

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