定制 khomerikik/eloquent-lens 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

khomerikik/eloquent-lens

最新稳定版本:v1.8.1

Composer 安装命令:

composer require khomerikik/eloquent-lens

包简介

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

README 文档

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

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-23