Skip to content

KhomerikiK/eloquent-lens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors