Download the PHP package laboiteacode/filament-dependency-graph without Composer

On this page you can find all versions of the php package laboiteacode/filament-dependency-graph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-dependency-graph

Filament Dependency Graph

Latest Version on Packagist Tests Total Downloads License

The visual architecture explorer for Filament.

Explore models, routes, controllers, Blade views, Livewire components, resources, panels and relationships from one visual workspace. Filament Dependency Graph automatically discovers the structure of a Laravel and Filament application and presents it through an interactive, navigable interface: a graph, a tree, a table, a contextual inspector, search, focus mode, filtering and exports.

Filament Dependency Graph

The problem

Large Laravel and Filament applications are hard to understand because their structure is scattered across models, relationships, resources, panels, relation managers, policies, traits, casts and morph maps. A developer joining an existing project inspects dozens of files before understanding which models exist, how they connect, which resources expose them and where circular dependencies live. Static diagrams rot; manual documentation is never complete.

The solution

Install the package, register the plugin, open one page, and immediately answer:

Features

Compatibility

The CI matrix is the source of truth.

Package PHP Laravel Filament
1.x 8.3, 8.4, 8.5 12.x, 13.x 4.x, 5.x

Installation

Register the plugin in your panel provider:

That is all: open /admin/dependency-graph in your local environment. The plugin can be registered on several panels, each with its own options.

Security warning

Class names, table names and relationship metadata are sensitive architecture information. The page is only visible when app()->isLocal() returns true. Never expose it publicly.

To enable it elsewhere, take an explicit decision:

visible() is an alias of canAccessUsing(). The callback replaces the local-only rule entirely, so make it as strict as your context requires.

The workspace

Graph view

The default view renders the dependency graph with typed nodes: panels, resource hexagons, Livewire components, model boxes and dashed polymorphic-target diamonds. The HTTP scope adds route tags, controllers, form requests, policy octagons, event rhomboids, dashed listeners and green hexagons for jobs, mailables and notifications, with controller methods and dispatch kinds on the edges. The Views scope draws templates as rectangles (layouts with a thicker border), Blade components as pentagons, Filament classes as hexagons, package views as dashed boxes and dynamic references as dashed diamonds, with the directive or tag (@include, <x-alert>, render) on each edge. Two layouts are available from the toolbar:

Interactions: zoom and pan, drag nodes, click a node or an edge to open the native Filament inspector slide-over (the rest of the graph fades to keep focus), click the canvas to clear, use the explicit zoom controls or Fit to re-center. The expand control temporarily gives the explorer column back to the canvas; press Esc to restore it. Relation labels appear once the zoom makes them readable.

Tree view

A cycle-safe, depth-limited expansion of the graph starting from the panels (or from the selected node), with the relation method displayed on every branch. Useful for answering "what hangs off this model" linearly.

In the Views scope the tree starts from what renders views - routes and controllers, Livewire, Filament, Blade components, mail - and unfolds each view into its layout, partials and components; templates nothing references are listed in their own group.

In the HTTP scope the tree starts from the routes, grouped by their first URI segment (/orders, /account...), and reads like a request: route, controller method, form request, models, dispatches, listeners. Events that nothing in the application dispatches are listed in their own group.

Table view

A native Filament Table exposes four inventory categories - models, relations, Livewire components and resources - through compact tabs. The HTTP scope swaps them for routes (action, middleware, form requests, models), events (listeners, queued listeners, dispatchers) and dispatched classes (kind, queue, dispatchers), next to the models. The Views scope shows views (kind, uses, used by), components (Blade classes, anonymous components, Filament classes, with their usage count), package views (missing ones flagged) and Livewire components. Search, sorting, pagination, column visibility and empty states follow the panel behavior automatically. Counts, aliases, views, foreign keys, pivot tables, navigation groups and discovery status remain available, and every row opens the inspector.

Inspector

Selecting a node or an edge opens a native Filament slide-over with everything the discovery collected: namespace, table, primary key, soft deletes, traits, casts, relation list with types and keys, pivot metadata, morph maps, Livewire aliases, rendered views and public APIs, panels and pages for resources, plus diagnostics when discovery was partial. Filament handles its focus trap, scroll lock, responsive placement and dismissal consistently with the rest of the panel.

Focus mode

Press F (or the inspector button) to restrict the graph to the neighborhood of the selected node, with a configurable depth (1, 2, 3 or unlimited) and direction (incoming, outgoing or both). The focus state lives in the URL query string, so the exact view can be shared or bookmarked.

Search

Press / and type: the search matches class names, labels, table names, namespaces, panel ids and relation methods, grouped by node type. Selecting a result clears the transient filters, selects the node and centers the graph on it.

Keyboard shortcuts

Key Action
/ Focus search
Esc Close inspector or exit focus mode
F Focus selected node
R Reset graph
G Graph view
T Tree view
L Table view
E Export JSON

Scopes

HTTP map

The HTTP scope answers "what happens when this URL is called?" without running a single request.

Node Where it comes from
Route The router. Application routes only: controllers under http.controller_namespaces, closures defined outside vendor/, view and redirect routes, and full-page Livewire components.
Controller The routes pointing to it. One node per class; each routed method appears on the edges and in the inspector.
Form request Action parameters typed with a FormRequest. Rules are read only when http.form_request_rules is enabled.
Model Route model binding, typed action parameters, and static references such as Order::query() in the action.
Policy Registered policies, the #[UsePolicy] attribute, then Laravel's naming convention - including a custom Gate::guessPolicyNamesUsing() callback, which is called to compute the name. Policies are never instantiated.
Event, listener The event dispatcher's listener map, which includes Laravel's event discovery. Listeners outside http.application_namespaces are ignored.
Job, mailable, notification X::dispatch(), X::broadcast() and new X in controller actions, listeners and job handle() methods, classified by their type (Mailable, Notification, event, ShouldQueue or bus Dispatchable).

Calls on injected application classes are followed one level deep: when store() calls $placeOrder->execute() on a typed parameter or $this->orders->archive() on a promoted property, the called method is read as well and its dispatches are attributed to the controller with a via note. Every dispatch keeps its file:line location in the inspector.

Route middleware combines the route definition with the framework's controller attributes (#[Middleware], #[Authorize], #[WithoutMiddleware] on Laravel 13, including on full-page Livewire components). The router then resolves it exactly as it would for a request - aliases, nested groups, and exclusions however they are written - and every alias or group name leading to an effective middleware is kept, so the explorer's middleware filter is reliable: "Routes using auth" keeps the routes whose middleware includes auth (directly, with parameters such as auth:sanctum, through a group or as its class) and what they reach, "Routes without auth" the others. The traversal is action-aware: a controller reached from index does not drag in what store dispatches; the tree view follows the same rule.

Detection limits

Everything above comes from registries, reflection and a token-level reading of the source. What cannot be known that way is left out rather than guessed:

Events without any dispatch found in controllers, listeners or jobs carry a No dispatcher found badge. Livewire components, console commands, observers and Filament actions are not scanned, so the event may be dispatched from there - or be dead code.

View map

The Views scope answers "what does this page render?" and "where is this component used?" without compiling or rendering a single template.

Node Where it comes from
View Every Blade file of the view paths (published resources/views/vendor/** overrides excluded by default), named as Laravel names it. Livewire 4 single-file and multi-file components included.
Blade component Class components reached from an <x-…> tag, plus the classes under views.blade_component_paths; their view comes from render().
Filament component Pages, widgets, fields, entries, columns and actions under views.filament_paths declaring their own $view (or returning it from getView()).
Package view Views and components of packages used by the application (<x-filament::badge>, filament::…, mail::message), shown as leaves. Views that do not exist are flagged Missing.
Dynamic view @include($view), <x-dynamic-component :component="…">, <livewire:is>: names only known at runtime.

Templates are read as text: @extends, @include, @includeIf, @includeWhen, @includeUnless, @includeFirst (every candidate), @each (and its empty view), @component, @livewire, <x-…> and <livewire:…> are extracted with their line, comments and @verbatim blocks ignored. Names are then resolved by the framework itself: the view finder for view names, Blade's component tag compiler for <x-…> (aliases, namespaces, anonymous components), Livewire's registry for <livewire:…>.

Each view has a kind, inferred from how it is used: layout, page, partial, component, livewire or mail. Templates and Blade class components that nothing references carry a No reference found badge.

The owners of views are read, never run: render() (or view() on Livewire 4), ->layout() and #[Layout] for Livewire (a component without either gets the view named after it under livewire.view_path, a full-page component without a layout gets the configured one: livewire.component_layout on Livewire 4, livewire.layout on Livewire 3), render() for Blade components, $view for Filament classes, content() / build() / toMail() for mail, Route::view() and Route::livewire() for routes and view() / View::make() / ->view() in controller actions.

A Filament widget embedded with @livewire(StatsWidget::class) points to its Filament node when it declares its own view.

In the HTTP scope, views stay leaves: a route shows the page it renders, not the layout and partials behind it. In the Views tree, a template shared by several pages is not unfolded twice at the same depth; its other occurrences are marked as already shown.

Detection limits

Configuration

Publish the configuration file when you need to adjust discovery:

Every option, with its default:

The plugin exposes the discovery knobs fluently:

Customizing the page

Navigation, page placement and layout follow the same conventions as the other La Boite a Code plugins. Everything is available fluently on the plugin, or under the navigation and page keys of the configuration file; the plugin wins when both are set:

The page renders full width by default so large graphs get the whole viewport; set page.max_content_width (or maxContentWidth()) to any Filament\Support\Enums\Width value to constrain it.

Translations

Every label ships in English and French. Publish the language files to adjust or add locales:

Views

The Blade views are publishable for deep customization, although the stable extension points (exporters, inspectors, configuration) should cover most needs:

Theming

The interface is built from the native Filament Blade components (sections, tabs, buttons, selects, checkboxes, badges) and the graph palette reads your panel color scales (primary, success, info, warning, gray) at runtime, so a custom Filament theme restyles the whole page - including the graph - without any extra work.

Exports

From the UI: the toolbar downloads the current graph, filters included, as JSON or Mermaid.

From the CLI:

For example:

Both exports are deterministic: same application state, same output. Diff them in CI to detect architecture drift, or commit the Mermaid file next to your documentation.

Cache

Discovery relies on reflection and file scanning, so snapshots are cached. The cache stores the discovered snapshot only - never rendered output - and is bypassed automatically in the testing environment.

The cache key includes the package schema version, the runtime versions and every discovery setting, so configuration changes never serve stale graphs.

Programmatic API

The facade proxies the DependencyGraphManager contract, so everything the UI does is scriptable:

GraphQuery accepts the scope, panel ids, node types, relation types, a focus node with depth and direction, whether orphans are included and, in the HTTP scope, a middleware filter - the same capabilities as the UI filters.

Extending

Custom exporters

Implement the GraphExporter contract and register it on the plugin:

The format becomes available in the UI and through the facade on panel requests. For console usage (--format=dot), register the exporter in a service provider instead, by resolving LaBoiteACode\DependencyGraph\Export\ExportManager and calling register() - the plugin only boots with its panel.

Custom inspectors

Implement the NodeInspector contract to enrich (or replace) the inspector panel for the nodes you care about. Custom inspectors are consulted before the built-in ones:

Troubleshooting

Testing

The suite runs on Pest with Orchestra Testbench against a realistic fixture domain covering every supported relation type, multi-panel resources and failure scenarios.

Architecture

The codebase is layered: a framework-agnostic domain (graph model, DTOs, algorithms), an application layer (use cases), infrastructure (discovery, cache, exporters) and a Filament presentation layer. Filament 4 and 5 differences are isolated behind a compatibility adapter. Architecture decision records live in docs/adr.

Changelog

See CHANGELOG.md for release notes.

Contributing

See CONTRIBUTING.md. Please report security issues privately as described in SECURITY.md.

Credits

License

Open source under the MIT license.


All versions of filament-dependency-graph with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.0 || ^5.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laboiteacode/filament-dependency-graph contains the following files

Loading the files please wait ...