以每小时 20 美元的价格聘请具备人工智能专业知识的 Laravel 开发人员。48 小时内即可开始工作。

Laravel Brain: Visualize Your Application's Request Lifecycle

发布日期 经过

Laravel Brain is a package that scans your Laravel application and renders an interactive graph of how requests flow through it. Install it, run the scan, and you'll get a visual map of your routes, controllers, services, repositories, models, jobs, events, Artisan commands, scheduled tasks, and broadcast channels—all in one place.

主要特点:

  • Interactive lifecycle graph — Visualizes every route through controllers, services, models, jobs, and events as an interactive node graph with multiple layouts and dark/light themes.
  • AI context export — One-click (or brain:export-context) copies a structured Markdown snapshot of any node's call chain, DB ops, and source snippets for pasting into any LLM.
  • AI rules file generation — Generates context/rules files for seven AI coding assistants (Claude Code, Cursor, Windsurf, Copilot, Junie, Aider, AGENTS.md) from your real architecture data.
  • Route stress testing — Run concurrent HTTP load tests against any route node with configurable concurrency, headers, and body; see timing percentiles while the graph animates live.
  • Watch mode + fat-class detection — Auto-rescans on PHP file changes and flags controllers or services exceeding 300 lines or 10 methods as complexity hotspots.

The graph is served directly through your Laravel app at /_laravel-brain , so there's nothing extra to set up or deploy separately.

Interactive Graph

Each route, controller action, service, model, job, and event appears as a colored node with arrows showing how data moves between them. You can click any node to inspect its details, view the source code inline, or pull up a flowchart of the method's internal logic.

Routes are organized into their own tabs so you can focus on a single endpoint without wading through the whole application at once. You can export graphs as PNG or Mermaid diagrams and choose from several layouts—hierarchical dagre, force-directed, breadth-first, circle, or grid. Dark and light themes are included, and the viewer will flag "fat classes" (controllers or services with more than 300 lines or 10 methods) as a quick sanity check on code health.

AI Context Export

One handy feature is the ability to copy a context snapshot for any node directly to your clipboard. The exported Markdown includes the route, call chain up to three levels deep, complexity hotspots, database operations per node, source snippets, and your full composer.jsonpackage.json dependency lists—formatted to paste straight into an AI coding tool.

You can also generate it from the terminal:

# Full project summary
php 工匠 brain:export-context
# Focused on a specific route
php 工匠 brain:export-context --route= "GET /users" --budget=4000

The same data is available via the API at GET /_laravel-brain/api/context

AI Rules Generation

The package can also generate context files for seven AI coding assistants from your scan data:

php 工匠 brain:generate-rules --target=claude --target=cursor

Each supported tool gets its own rules file, populated with your project's actual architecture, routes, packages, and code health data rather than generic boilerplate.

You can find full installation instructions and the 源代码 在 GitHub 上。

保罗·雷德蒙德照片

Laravel News 特约撰稿人。全栈 Web 开发人员兼作家。

归档于:
立方体

Laravel 时事通讯

加入超过 4 万名开发者的行列,不错过任何新的技巧、教程等内容。

图像
Laravel 代码审查

几天内即可获得 Laravel 代码审查方面的专家指导

访问 Laravel 代码审查
几天内即可获得 Laravel 代码审查徽标的专家指导

几天内即可获得 Laravel 代码审查方面的专家指导

专家级代码审查!两位拥有 10 年以上 Laravel 开发经验的开发者将为您提供清晰、实用的反馈,帮助团队构建更优质的应用程序。

几天内即可获得 Laravel 代码审查方面的专家指导
SaaSykit:Laravel SaaS 入门套件徽标

SaaSykit:Laravel SaaS 入门套件

SaaSykit 是一个多租户 Laravel SaaS 入门套件,包含运行现代 SaaS 所需的所有功能,例如支付、美观的结账界面、管理面板、用户仪表盘、身份验证、现成组件、统计数据、博客、文档等等。

SaaSykit:Laravel SaaS 入门套件
Kirschbaum 标志

樱桃树

提供创新和稳定性,确保您的Web应用程序取得成功。

樱桃树
Shift 标志

转移

还在运行旧版本的 Laravel?立即实现 Laravel 自动升级和代码现代化,让您的应用程序保持最新状态。

转移
SerpApi logo

SerpApi

Access real-time search engine results through a simple API—no more scraping headaches! Use it for AI applications, SEO tools, product research, travel information, and more

SerpApi
Laravel Cloud 标志

Laravel 云

轻松创建和管理服务器,并在几秒钟内部署 Laravel 应用程序。

Laravel 云
了解 Softtech 的标志

了解软科技

Acquaint Softtech 提供 AI 就绪的 Laravel 开发人员,48 小时内即可上手,每月费用为 3000 美元,没有冗长的销售流程,并提供 100% 退款保证。

了解软科技
Lucky Media 标志

幸运传媒

Get Lucky Now——拥有十余年经验的 Laravel 开发理想之选!

幸运传媒
鱼叉:新一代时间跟踪和发票标志

Harpoon:新一代时间跟踪和发票系统

新一代时间跟踪和计费软件,帮助您的机构规划和预测盈利的未来。

Harpoon:新一代时间跟踪和发票系统
Tinkerwell 徽标

廷克威尔

Laravel 开发者必备的代码运行器。可在本地和生产环境中体验 AI、自动补全和即时反馈功能。

廷克威尔
PhpStorm 标志

PhpStorm

首选的 PHP IDE,对 Laravel 及其生态系统提供广泛的开箱即用支持。

PhpStorm
Queue-Wide Inspection Methods in Laravel 13.8.0 image

Queue-Wide Inspection Methods in Laravel 13.8.0

阅读文章
Verifiable Audit Logging with Laravel Chronicle image

Verifiable Audit Logging with Laravel Chronicle

阅读文章
Ship AI with Laravel: Search Entire PDFs with Zero Search Logic image

Ship AI with Laravel: Search Entire PDFs with Zero Search Logic

阅读文章
Personalized Content Delivery System: Building an AI-powered recommendation engine with Laravel and MongoDB image

Personalized Content Delivery System: Building an AI-powered recommendation engine with Laravel and MongoDB

阅读文章
Laravel Shopper: A Headless E-Commerce Admin Panel for Laravel image

Laravel Shopper: A Headless E-Commerce Admin Panel for Laravel

阅读文章
Chevere Workflow: A Declarative PHP Workflow Engine with Async Job Execution image

Chevere Workflow: A Declarative PHP Workflow Engine with Async Job Execution

阅读文章