PHPackages                             lorapok/laravel-execution-monitor - 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. lorapok/laravel-execution-monitor

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

lorapok/laravel-execution-monitor
=================================

Zero-configuration performance monitoring for Laravel applications with real-time alerts and beautiful UI

v1.3.10(4mo ago)22[1 PRs](https://github.com/Maijied/lorapok/pulls)MITPHPPHP ^7.3|^8.0|^8.1|^8.2|^8.3CI passing

Since Jan 9Pushed 3mo agoCompare

[ Source](https://github.com/Maijied/lorapok)[ Packagist](https://packagist.org/packages/lorapok/laravel-execution-monitor)[ RSS](/packages/lorapok-laravel-execution-monitor/feed)WikiDiscussions main Synced 1mo ago

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

🚀 Lorapok - Laravel Execution Monitor
=====================================

[](#-lorapok---laravel-execution-monitor)

**Zero-configuration performance monitoring for Laravel applications**

\#MaJHiBhai - Your friendly Laravel performance companion 🐛

[Explore Documentation](https://maijied.github.io/lorapok/docs.html) • [View Changelog](https://maijied.github.io/lorapok/changelog.html) • [Download](https://maijied.github.io/lorapok/download.html)

[![Lorapok Marketing](images/widget-showcase.png)](images/widget-showcase.png)

✨ Features
----------

[](#-features)

### Core Monitoring

[](#core-monitoring)

- 🎯 **Zero Configuration** - Works out of the box with sensible defaults
- 🤖 **Smart Auto-Detection** - Automatically enables in dev/local/staging, disables in production
- 🎨 **Beautiful Floating Widget** - Real-time metrics in a sleek, animated UI with dev profile
- ⚡ **Performance Tracking** - Routes, queries, functions, memory usage, timers
- 📊 **Real-Time Dashboard** - Interactive modal with tabs for overview, routes, and queries
- 💾 **Memory Profiling** - Current and peak memory usage tracking
- ⏱️ **Execution Timing** - Precise request execution and function timing measurements

### Query Management

[](#query-management)

- 📋 **Clipboard Integration** - Copy queries with one click from the widget
- ⌨️ **Keyboard Shortcuts** - Press `Ctrl+Shift+C` (or `Cmd+Shift+C` on Mac) to copy selected query
- 🗂️ **Clipboard History** - Automatic storage of last 20 copied queries in browser localStorage
- 🔍 **Query Selection** - Click to select queries with visual highlighting
- ⏱️ **Query Timing** - See execution time for each database query

### CLI Tools &amp; Auditing

[](#cli-tools--auditing)

- 📋 **Performance Audit** - `php artisan monitor:audit` for security and performance health checks
- 🔥 **Heatmap Visualization** - `php artisan monitor:heatmap` to see which routes are consistently slow
- 🏆 **Achievement System** - Earn badges for performance optimizations (Memory Master, Query Slayer)
- 📊 **Status Check** - Quick view of monitoring state and environment

### Changelog

[](#changelog)

**v1.3.6** (2026-01-10)

- ✅ **UI/UX**: Premium **Optimization Quests** redesign with glassmorphism and animated decorative larvae (🦋).
- ✅ **Settings**: Fully restored SMTP configuration fields for granular email notification control.
- ✅ **Logs**: Centered navigation tabs and middle-aligned controls for a standard professional layout.
- ✅ **Stability**: Fixed Alpine.js `undefined` errors and stabilized monitor modal positioning.

**v1.3.0** (2026-01-10)

- ✅ **UI/UX**: Unique, professional identities for header action buttons (Quests, Dev, Settings).
- ✅ **CI/CD Fix**: Resolved `BindingResolutionException` and workflow path drift in GitHub Actions.
- ✅ **Navigation**: Quests integrated into the top header for a cleaner main layout.
- ✅ **Navigation**: Added floating **Home** button to all test lab pages for easier navigation.
- ✅ **System Info**: Added PHP and Database (driver + version) information to monitor footer.
- ✅ **Timeline Complete**: Added missing `queries` and `controller` segments to Larvae Trail.
- ✅ **Fixed N/A Data**: Updated middleware to ensure request metrics (method, path, status) are captured.
- ✅ **Isolation**: Added timeline reset to prevent data pollution between requests.

**v1.2.4** (2026-01-09)

- ✅ **UI Fix**: Resolved `[object Object]` rendering in performance alerts modal.
- ✅ **CI/CD**: Improved reliability of automated builds.

**v1.2.0** (2026-01-09)

- 🚀 **Major Refactoring**: PSR-4 compliant structure (Reporters/Services)
- 🏆 **Achievement System**: Persistent performance milestones
- 🔥 **Performance Heatmap**: New `monitor:heatmap` visualization
- 🔒 **Security Audit**: New `monitor:audit` command
- ✅ **Bug Fixes**: Class loading, Dashboard sync, UI feedback

**v1.1.1** (2026-01-09)

**v1.1.0** (2026-01-08)

- ✅ Enhanced Developer Profile with photo
- ✅ Redesigned Settings Modal
- ✅ Professional marketing assets integrated

**v1.0.0** (2026-01-06)

- ✅ Initial release with core monitoring features
- ✅ Query tracking and history
- ✅ Multi-channel notifications

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

[](#-installation)

```
composer require lorapok/laravel-execution-monitor
```

🔔 Discord integration
---------------------

[](#-discord-integration)

[![Discord Integration](images/discord-screenshot.png)](images/discord-screenshot.png)

To enable Discord notifications, add the following to your application's `.env` (or set via your deployment configuration):

```
MONITOR_DISCORD_WEBHOOK=https://discordapp.com/api/webhooks/your_webhook_id/your_webhook_token
MONITOR_DISCORD_ENABLED=true

```

For local development you can also open the Lorapok widget and save a local developer webhook under Settings (stored in browser localStorage) — this is intended for developer convenience only. For production, prefer the `.env` approach.

To test sending an on-demand alert from the application, run:

```
php tools/trigger_discord_test.php

```

A GitHub Actions workflow is provided at `.github/workflows/phpunit.yml` that runs `composer install` and `phpunit` on push and pull requests.

That's it! The package automatically enables in local/dev/staging and disables in production.

### Optional: Full Installation

[](#optional-full-installation)

```
php artisan monitor:install
```

🚀 Quick Start
-------------

[](#-quick-start)

```
use Lorapok\ExecutionMonitor\Facades\Monitor;

// Track execution time
Monitor::start('expensive-operation');
// ... your code
Monitor::end('expensive-operation');

// Or use a closure
$result = monitor('api-call', function() {
    return Http::get('https://api.example.com/data');
});
```

🎨 The Widget
------------

[](#-the-widget)

A beautiful floating button appears in your application. Click it to see:

- 📊 Overview - Performance metrics at a glance
- 🛣️ Routes - All tracked routes with execution times
- 🗄️ Queries - Database queries with timing and copy-to-clipboard
- ⚡ Functions - Custom tracked functions
- 💾 Memory - Memory usage statistics

### Clipboard Features

[](#clipboard-features)

- **Click Copy Button** - Each query has a copy button; click to copy SQL to clipboard and see "Copied!" feedback
- **Keyboard Shortcut** - Press **Ctrl+Shift+C** (or Cmd+Shift+C on Mac) to copy the selected query (or first if none selected)
- **Clipboard History** - All copied queries are stored in browser localStorage (max 20 entries) for easy access

🖼️ Gallery
----------

[](#️-gallery)

### Core Monitoring Dashboard

[](#core-monitoring-dashboard)

**Real-Time Overview**
[![Monitor Dashboard](images/monitor_main.png)](images/monitor_main.png)**Timeline Visualization**
[![Timeline](images/Timeline_monitor.png)](images/Timeline_monitor.png)**Routes Analysis**
[![Routes](images/Routes_Monitor.png)](images/Routes_Monitor.png)**Query Intelligence**
[![Queries](images/Query_Monitor.png)](images/Query_Monitor.png)**Middleware Stack**
[![Middleware](images/Middleware%20Monitor.png)](images/Middleware%20Monitor.png)**Cache ROI**
[![Cache](images/Cache_Monitor.png)](images/Cache_Monitor.png)**Log Viewer**
[![Logs](images/Log_monitor.png)](images/Log_monitor.png)**Activity Monitor**
[![Activity](images/Activity_Monitor.png)](images/Activity_Monitor.png)### Developer Productivity

[](#developer-productivity)

**Developer Profile (#MaJHiBhai)**
[![Profile](images/developer_profile.png)](images/developer_profile.png)**In-Browser Terminal**
[![Terminal](images/Lorapok_terminal.png)](images/Lorapok_terminal.png)**API Playground**
[![API Playground](images/API_Playgorund_Monitor.png)](images/API_Playgorund_Monitor.png)**Usage Guide**
[![Guide](images/Usage_guide.png)](images/Usage_guide.png)**Optimization Quests**
[![Quests](images/Optimization%20Quest.png)](images/Optimization%20Quest.png)### Settings &amp; Configuration

[](#settings--configuration)

**Advanced Config**
[![Advanced](images/Advance_Setting.png)](images/Advance_Setting.png)**Alert Thresholds**
[![Alerts](images/Alert_Setting.png)](images/Alert_Setting.png)**Email Notifications**
[![Email](images/Email_setting.png)](images/Email_setting.png)**Discord Integration**
[![Discord](images/Discord_Setting.png)](images/Discord_Setting.png)**Slack Integration**
[![Slack](images/Slack_Setting.png)](images/Slack_Setting.png)### Brand Assets

[](#brand-assets)

**Larvae Mascot**
[![Mascot](images/larvae-mascot.png)](images/larvae-mascot.png)📊 Check Status
--------------

[](#-check-status)

```
# Check if monitoring is active
php artisan monitor:status

# Force enable
php artisan monitor:enable

# Disable monitoring
php artisan monitor:disable
```

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

[](#️-configuration)

Publish config (optional):

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

Edit `config/execution-monitor.php`:

```
return [
    'auto_detect' => true,  // Smart environment detection
    'features' => [
        'widget' => true,
        'routes' => true,
        'queries' => true,
        'functions' => true,
    ],
    'thresholds' => [
        'route' => 1000,   // ms
        'query' => 100,    // ms
    ],
];
```

🎭 Environment Modes
-------------------

[](#-environment-modes)

ModeLocalStagingProduction`local-only` (default)✅❌❌`non-production`✅✅❌`custom`ConfigConfigConfig📢 Broadcasting &amp; Real-Time Alerts
-------------------------------------

[](#-broadcasting--real-time-alerts)

Lorapok integrates with Laravel Broadcasting to send real-time performance alerts to your team:

```
# Configure Pusher in .env
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=your_app_id
PUSHER_APP_KEY=your_app_key
PUSHER_APP_SECRET=your_secret
PUSHER_APP_CLUSTER=ap2
```

When thresholds are exceeded, performance alerts are:

- 📬 Broadcast to all connected clients in real-time
- 🔔 Sent to configured notification channels (Slack, Discord, Email)
- 💾 Optionally stored in database for audit trail

🎤 Notifications
---------------

[](#-notifications)

Configure multiple notification channels in `config/execution-monitor.php`:

```
'notifications' => [
    'slack' => [
        'enabled' => true,
        'webhook_url' => env('MONITOR_SLACK_WEBHOOK'),
        'channel' => '#monitoring',
    ],
    'discord' => [
        'enabled' => true,
        'webhook_url' => env('MONITOR_DISCORD_WEBHOOK'),
    ],
    'mail' => [
        'enabled' => true,
        'to' => env('MONITOR_MAIL_TO', 'admin@example.com'),
    ],
],
'rate_limiting' => [
    'enabled' => true,
    'max_per_hour' => 10,
],
```

📚 Advanced Usage
----------------

[](#-advanced-usage)

### In Controllers

[](#in-controllers)

```
use Lorapok\ExecutionMonitor\Traits\TracksExecutionTime;

class UserController extends Controller
{
    use TracksExecutionTime;

    public function index()
    {
        $this->startTimer('user-fetch');
        $users = User::paginate(20);
        $this->endTimer('user-fetch');

        return view('users.index', compact('users'));
    }
}
```

### Helper Functions

[](#helper-functions)

```
// Quick tracking
monitor()->start('task');
// ...
monitor()->end('task');

// With closure
$data = monitor('fetch-data', fn() => $this->getData());

// Check if enabled
if (execution_monitor_enabled()) {
    // monitoring code
}
```

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

[](#-contributing)

Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md).

📄 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) file.

🐛 About Lorapok
---------------

[](#-about-lorapok)

**Lorapok** (inspired by Black Soldier Fly Larvae) is a lightweight, zero-config performance monitoring package for Laravel. Like its namesake insect, Lorapok works quietly in the background to identify and eliminate performance bottlenecks, helping your Laravel application become more efficient and fast.

Lorapok makes it easy for developers to:

- 🔍 Identify slow queries and routes
- 📊 Monitor memory usage in real-time
- 🚨 Set up automatic performance alerts
- 📋 Copy and analyze database queries
- 🏃 Track custom code execution

👨‍💻 About the Creator
---------------------

[](#‍-about-the-creator)

 [![Mohammad Maizied Hasan Majumder](images/author.jpg)](images/author.jpg)### Mohammad Maizied Hasan Majumder

[](#mohammad-maizied-hasan-majumder)

**\#MaJHiBhai** - Making Laravel Fast! ⚡

---

🕒 Recent Activity
-----------------

[](#-recent-activity)

*Last updated on: 2026-01-09* - Finalized stable release v1.2.8 🚀

**Lorapok** is developed and maintained by **Mohammad Maizied Hasan Majumder**

📧 Email: 🔗 LinkedIn: [linkedin.com/in/maizied](https://www.linkedin.com/in/maizied/)🐙 GitHub: [@Maijied](https://github.com/Maijied)

Made with ❤️ for the Laravel community by [@Maijied](https://github.com/Maijied)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance77

Regular maintenance activity

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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

20

Last Release

123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/085d96d3f88205736e02f8c7ba920c1a838725ae1128c4feaf2caece92e1441d?d=identicon)[maizied](/maintainers/maizied)

---

Top Contributors

[![Maijied](https://avatars.githubusercontent.com/u/11429916?v=4)](https://github.com/Maijied "Maijied (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")

---

Tags

laravelmonitoringprofilerperformancedebuggingexecution timequery-monitorlorapok

### Embed Badge

![Health badge](/badges/lorapok-laravel-execution-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/lorapok-laravel-execution-monitor/health.svg)](https://phpackages.com/packages/lorapok-laravel-execution-monitor)
```

###  Alternatives

[jackwh/laravel-new-relic

Monitor your Laravel application performance with New Relic

112827.2k](/packages/jackwh-laravel-new-relic)[tomloprod/time-warden

TimeWarden is a lightweight PHP library that enables you to monitor the processing time of tasks and task groups (useful during the development stage). Additionally, it allows you to set maximum execution times to tasks, empowering proactive actions when tasks exceed their planned duration.

16916.2k](/packages/tomloprod-time-warden)[scoutapp/scout-apm-laravel

Scout Application Performance Monitoring Agent - https://scoutapm.com

23831.3k](/packages/scoutapp-scout-apm-laravel)[kssadi/log-tracker

A powerful, intuitive, and efficient log viewer for Laravel applications.

264.8k](/packages/kssadi-log-tracker)

PHPackages © 2026

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