Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Dependency Graph Laravel Package

laboiteacode/filament-dependency-graph

Visual architecture explorer for Filament that automatically discovers Eloquent models, relations, Livewire components, resources and panels with no configuration, then presents them in an interactive graph, tree, table and inspector with search, filtering and exports.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the new release and rebuild Filament assets:
    composer require laboiteacode/filament-dependency-graph:^1.2
    php artisan filament:assets
    
  • Register the plugin in your Filament panel provider as documented, then open the Dependency Graph page in the admin panel.
  • Look first at the HTTP scope. Pick a route, then inspect its controller action, middleware, form requests, models, policies, events/listeners, and dispatched jobs/mailables/notifications. Locations include file:line, so this is immediately useful before refactoring.
  • First practical use case: before changing a controller, listener, or job, open the HTTP scope and check what it touches and what dispatches it. Use the middleware filter to narrow to auth, tenant, or API routes.
  • For frontend work, switch to the Views scope to see Blade templates, components, Livewire components, and their owners. Use the route-to-view bridge when you need to know which template a route renders.

Implementation Patterns

  • Impact analysis before refactors: Use HTTP scope as a static map of route → controller → form request → model/policy → event/listener → job/mailable/notification. The one-level-deep detection into injected application classes is useful for tracing dispatches without running code.
  • Middleware-focused review: Filter by middleware in the explorer, set GraphQuery::$middleware for programmatic queries, or pass --middleware to the export command. This is especially useful for isolating authenticated, tenant-scoped, or API routes.
  • View ownership tracing: In Views scope, trace @extends, @include, @each, @component, @livewire, <x-…>, and <livewire:…> references with line numbers. Use view owners to connect Livewire render()/layouts, Blade class components, Filament classes with custom $view, mailables, notifications, Route::view(), Route::livewire(), and controller actions.
  • Architecture documentation: Export Mermaid diagrams with --scope=http or --scope=views and include them in PRs or design docs. Edge labels containing directives or component tags are now quoted, which avoids broken Mermaid output.
  • Scope control per panel: Use allowHttpScope() and allowViewsScope() when a panel should expose only certain scopes. Keep Filament and Laravel scopes as the default lightweight views; HTTP and Views are opt-in where they add value.
  • Form request rules: Enable http.form_request_rules only when you need rule-level detail. It is opt-in for a reason; enabling it broadly can add noise to the graph.
  • Explorer workflow: Use inspectors for node details, tree views for ownership chains, table datasets for sorting/filtering, and search by file path when you know the file but not the graph node. Use the “No reference found” and “No dispatcher found” badges as prompts to inspect dynamic code manually.

Gotchas and Tips

  • Static analysis only: Controllers, form requests, policies, components, Livewire classes, and mailables are never instantiated; templates are never compiled or rendered. Dynamic includes, variable view names, string-based dispatches, and container-resolved classes beyond one level deep may not appear. Treat missing edges as a prompt to inspect runtime code.
  • Dynamic references are expected: Look for dynamic-reference markers and the “No reference found” / “No dispatcher found” badges. They usually mean the package saw a possible reference but could not resolve it statically.
  • Middleware resolution: Middleware is resolved like the router does, including route cache, but custom runtime middleware behavior is not executed. If a route looks incomplete, verify middleware aliases/groups and route caching setup.
  • Livewire and Blade dependencies: The Views scope relies on the view finder, Blade’s component tag compiler, and Livewire’s registry. Ensure your Livewire version is compatible. Livewire 4 single-file and multi-file components are supported; package views are treated as leaves.
  • Snapshot schema 1.4: Cached snapshots rebuild automatically after the schema change. If the graph looks stale after upgrading, clear application/package caches and reload the panel. The snapshot is read once per request, and the renderer receives only the fields it draws, so large graphs should remain practical.
  • Scope and CLI options: Use --scope=http|views on the export command to avoid exporting every scope. Use allowHttpScope() / allowViewsScope() to hide scopes from panels where they are not relevant. Filament and Laravel scopes remain unchanged and are built without the HTTP and view maps.
  • Compatibility: This release targets PHP 8.3–8.5, Laravel 12–13, Filament 4–5, and Livewire 3–4. Check these before upgrading, especially if you are still on older Filament or Livewire versions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums