khomerikik/eloquent-lens

Visual dashboard for Laravel Eloquent models — see relationships, scopes, casts, policies, and complexity at a glance. No database queries.

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

pkg:composer/khomerikik/eloquent-lens

v1.8.1 2026-02-24 09:41 UTC

This package is auto-updated.

Last update: 2026-02-24 09:41:34 UTC


README

EloquentLens loading screen

EloquentLens

A visual dashboard for your Laravel Eloquent models.
Relationships, scopes, casts, policies, complexity — all at a glance. No database queries.

Latest Version Total Downloads PHP Version Laravel Version License

Install

composer require khomerikik/eloquent-lens --dev
php artisan eloquent-lens:install

Add to your .env to enable the dashboard:

ELOQUENT_LENS_ENABLED=true

Then open /eloquent-lens in your browser.

Dev only — install with --dev. The dashboard is disabled by default and must be explicitly enabled.

Config

Published to config/eloquent-lens.php after running eloquent-lens:install:

Option Default Description
path 'eloquent-lens' URL prefix — dashboard is available at /{path}
middleware ['web'] Route middleware — add 'auth' to restrict access
model_paths [app_path('Models')] Directories to scan for model files
model_namespace 'App\\Models' Base namespace for your models
excluded_models [] Model classes to skip during scanning
enabled false Disabled by default — set ELOQUENT_LENS_ENABLED=true in .env to enable

The Board

All your models laid out as cards, connected by relationship lines. Drag, zoom, filter by type.

Full board with model cards and relationship lines

Detail Panel

Click any model to open a side panel with four tabs:

Board with detail panel open

Overview — traits, casts, accessors, fillable fields, complexity score

Overview tab

Relations — every relationship with its type and target model

Relations tab

Behavior — local scopes, global scopes, observers, custom methods

Behavior tab

Path Finder

Pick two models and discover how they connect through relationships, up to 5 hops deep.

Path Finder showing routes between Balance and Transfer

Requirements

  • PHP 8.1+
  • Laravel 10, 11, or 12

License

MIT