Download the PHP package clcbws/laravel-eloquent-insight without Composer

On this page you can find all versions of the php package clcbws/laravel-eloquent-insight. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-eloquent-insight

Laravel Eloquent Insight ๐Ÿง 

Latest Version on GitHub Total Downloads License

Laravel Eloquent Insight is a premium performance suite that identifies, ranks, and resolves database bottlenecks. While most tools just "shout" at you when an N+1 violation happens, Insight provides the intelligence to understand why and the tools to fix it automatically.

Fully optimized for Laravel 13.x, with legacy support for 12.x and 11.x.


โ“ Why Eloquent Insight?

In standard Laravel development, the N+1 Problem is the #1 killer of application performance. You load 50 users, and Laravel accidentally fires 51 queries to fetch their profiles.

The Problem with Other Tools:

The Insight Solution:


โœจ Key Features (The Elite Suite)

๐Ÿ“Š Impact Scoring

Not all N+1s are equal. Insight ranks every violation:

๐Ÿ‘ป Ghost Relation Detection

Sometimes you use ->with(['user', 'profile']) but then delete the code that used the profile. The profile is still being loaded, wasting memory and DB time. Insight flags these "Ghost Relations" so you can strip them out.

๐Ÿ’ง Hydration Profiling (The "Fat Model" Finder)

If you SELECT * on a table with 50 columns but only display the name, you are wasting memory. Insight compares what you fetched vs. what you accessed, suggesting surgical ->select([...]) arrays.

๐Ÿ—บ๏ธ Query Topology Visualization

Complex apps have messy relationship chains. Insight generates a Mermaid.js graph that shows exactly how your queries flow, helping you visualize the "execution distance" between your models.

๐Ÿ”„ Redundancy (Duplicate) Detection

Detects identical SQL queries with matching bindings fired in the same requestโ€”often a sign of redundant service calls or missing caching logic.


๐Ÿš€ The "Capture-Compile-Resolve" Workflow

Insight follows a professional 3-step lifecycle:

  1. CAPTURE (Local): While you develop, Insight records violations in the background. You can see them in your terminal or via the Browser UI Overlay.
  2. COMPILE (CI/Build): Before deploying, you run php artisan insight:compile. This takes all your developer "fixes" and squashes them into a high-speed PHP manifest.
  3. RESOLVE (Production): In production, our RuntimeResolver reads the manifest and "magically" eager-loads the missing relations with zero database tracing.

๐Ÿ“ฆ Installation

Note: The resolution engine is production-safe, but the recording tools are strictly for development.


๐Ÿ› ๏ธ Usage (CLI & Terminal)

3. Clear the Slate

If you want to start a fresh audit session, clear the historical logs:

4. Audit & Fix

Once violations are captured, run the analysis:

๐Ÿš€ Production Deployment

For maximum performance in production, compile your detected optimizations into a static manifest. This converts dynamic analysis into an O(1) lookup:

This will generate storage/framework/insight/manifest.json, which is then used by the runtime engine with zero overhead.

Smart Auto-Fixer (The Wizard)

To have Insight automatically refactor your source code to add missing with() calls:


๐Ÿ–ฅ๏ธ UI Integration (Controllers, Livewire, Blade)

๐ŸŽจ Browser UI Overlay

In your local environment, a premium Shadow-DOM overlay is injected into your HTML responses.

๐ŸŽฎ Controller Usage

Perfect for building custom admin APIs or JSON health endpoints.

โšก Livewire Integration

Build a real-time "Eloquent Health" indicator for your admin panel.

๐Ÿƒ Blade Templates

Quickly show an alert to administrators if performance regressions are detected in local dev.


๐Ÿ—๏ธ Architecture

  1. Collector: Low-level event listeners for Eloquent events.
  2. Heuristic Engine: Pattern-matching logic to identify entry points.
  3. AST Fixer: Safe PHP code modification via Abstract Syntax Trees.
  4. O(1) Resolver: High-speed manifest loader for production.

๐Ÿš€ Roadmap

Future versions of Eloquent Insight will focus on expanding the auto-fix capabilities:


๐Ÿ“Š Comparison: Why Insight Wins

Feature Standard Trackers (DebugBar/Clockwork) Laravel Eloquent Insight
Production Overhead ๐Ÿข High (Continuous Tracing) โšก Zero (Static Resolver)
Resolution ๐Ÿ“ฃ Manual Fixing Only ๐Ÿง™ Auto-Fix (AST Engine)
Analysis ๐Ÿ“„ Flat List of Queries ๐Ÿ† Impact Scoring (Weighted)
Optimization โŒ None ๐Ÿ“ฆ O(1) Compiled Manifest
Visuals ๐Ÿ“Š Generic Tables ๐Ÿ—บ๏ธ Mermaid Topology Graphs

โš™๏ธ Advanced Configuration

Beyond the basic toggles, you can fine-tune the engine in config/insight.php:

ignore_namespaces

Prevent Insight from analyzing internal framework traces. This keeps your reports focused on your code.

storage_path

Custom location for the violation buffer and exported reports.


๐Ÿ›ก๏ธ Production Security & Gating

We take production stability seriously. Eloquent Insight uses a dual-layer gate:

  1. Physical Gating: The ViolationInterceptor and EfficiencyInterceptor strictly check \app()->isLocal() before registering any listeners.
  2. Feature Gating: All recording logic is disabled if INSIGHT_ENABLED is false in your .env.

In production, only the Runtime Resolver is active, performing a single O(1) array lookup per request. No traces are generated, and no files are written.


๐Ÿ› ๏ธ Troubleshooting

"The UI Overlay isn't appearing"

  1. Ensure INSIGHT_UI_ENABLED=true is set in your .env.
  2. Verify you are in the local environment (APP_ENV=local).
  3. Insight only injects into standard HTML responses (it skips JSON/API calls).

"Permission denied in storage"

Insight needs to write to storage/framework/insight/. Ensure this directory is writable by your web server:


๐Ÿค Credits



All versions of laravel-eloquent-insight with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^13.0|^12.0|^11.0
illuminate/database Version ^13.0|^12.0|^11.0
illuminate/console Version ^13.0|^12.0|^11.0
nikic/php-parser Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clcbws/laravel-eloquent-insight contains the following files

Loading the files please wait ...