PHPackages                             apilens/laravel-api-lens - 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. apilens/laravel-api-lens

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

apilens/laravel-api-lens
========================

API request logger and dashboard for Laravel

v0.1.8(1mo ago)17MITPHPPHP ^8.1

Since Mar 17Pushed 1mo agoCompare

[ Source](https://github.com/anirbancodes69/laravel-api-lens)[ Packagist](https://packagist.org/packages/apilens/laravel-api-lens)[ RSS](/packages/apilens-laravel-api-lens/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

⭐ If you find this useful, give it a star

🚀 ApiLens — Instant API Monitoring for Laravel
==============================================

[](#-apilens--instant-api-monitoring-for-laravel)

Stop guessing what your APIs are doing.

**ApiLens** gives you a real-time dashboard of your Laravel application's requests — without setting up complex tools like Datadog or NewRelic.

---

⚡ Why ApiLens?
--------------

[](#-why-apilens)

- ⚡ **Zero setup** — install and start tracking instantly
- 🔍 **See every request** — endpoint, status, duration
- 🚨 **Spot errors fast** — 4xx / 5xx tracking
- 🐢 **Detect slow APIs** — performance insights
- 🧩 **Built for Laravel** — no external services

---

📸 Dashboard Preview
-------------------

[](#-dashboard-preview)

> *(Add your screenshot here: `docs/dashboard.png`)*

---

🎯 Perfect For
-------------

[](#-perfect-for)

- Laravel developers
- Freelancers building APIs
- Startups needing quick visibility
- Debugging production issues

---

📊 Features
----------

[](#-features)

- Request logging (endpoint, method, status, time)
- Error tracking
- Top endpoints
- Slow endpoints
- Filters (status, endpoint)
- Built-in dashboard (`/apilens`)
- Simple token-based access control
- Database + log transport support

---

📦 Installation
--------------

[](#-installation)

```
composer require apilens/laravel-api-lens
```

---

⚙️ Setup (Recommended)
----------------------

[](#️-setup-recommended)

Before installing, configure your `.env`:

```
APILENS_TRANSPORT=database
APILENS_TOKEN=your-secret
```

Then run:

```
php artisan apilens:install
```

This will:

- Run migrations
- (Optional) publish config
- Guide you to next steps

---

🚀 Usage
-------

[](#-usage)

Open your browser:

```
http://localhost:8000/apilens?token=your-secret

```

---

🔐 Security
----------

[](#-security)

ApiLens uses simple token-based protection:

```
/apilens?token=your-secret

```

You can disable auth in config if needed.

---

⚙️ Configuration
----------------

[](#️-configuration)

(Optional — publish only if you want to customize)

```
php artisan vendor:publish --tag=apilens-config
```

Config file:

```
config/apilens.php

```

---

🗄 Database
----------

[](#-database)

Migrations are loaded automatically from the package.

You only need:

```
php artisan migrate
```

> You do NOT need to publish migrations unless you want to modify them.

---

🔌 Transport Options
-------------------

[](#-transport-options)

```
APILENS_TRANSPORT=database
```

Available:

- `database` → stores logs in DB
- `log` → stores logs in file

---

🧠 How It Works
--------------

[](#-how-it-works)

1. Middleware captures request + response
2. Event is created
3. Tracker sends data to transport
4. Transport stores logs (DB/file)
5. Dashboard visualizes data

---

🧪 Quick Test
------------

[](#-quick-test)

Hit any route:

```
/api/test
/test

```

Refresh dashboard → see logs instantly

---

🛠 Development (Local Package)
-----------------------------

[](#-development-local-package)

```
"repositories": [
  {
    "type": "path",
    "url": "../package"
  }
]
```

---

🚧 Roadmap
---------

[](#-roadmap)

- 📈 Charts &amp; analytics
- ⏱ Time-based filters
- 🔔 Alerts (Slack/email)
- 🌐 SaaS dashboard (multi-project)

---

🤝 Contributing
--------------

[](#-contributing)

PRs are welcome.

---

📄 License
---------

[](#-license)

MIT

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

9

Last Release

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/feed3e01c93af2d41ceb3477718e7294e9db07def7c9c257625aad29a06e36de?d=identicon)[anirbancodes69](/maintainers/anirbancodes69)

---

Top Contributors

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

---

Tags

api-monitoringdeveloper-toolslaravelloggingobservabilityphp

### Embed Badge

![Health badge](/badges/apilens-laravel-api-lens/health.svg)

```
[![Health](https://phpackages.com/badges/apilens-laravel-api-lens/health.svg)](https://phpackages.com/packages/apilens-laravel-api-lens)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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