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

Laravel View Xray Laravel Package

beyondcode/laravel-view-xray

BeyondCode's Laravel View Xray lets you inspect Blade views directly in the browser. See which view file is rendered and what data it receives, making it easy to debug view composers, includes, and data issues in Laravel applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Laravel View Xray is a development-time Blade attribution overlay, not a runtime capability. It hooks the view-rendering pipeline, wraps each rendered view in an annotated element, and injects a floating label into HTML responses so a developer can hover a region of the page and see the exact Blade file that produced it. That makes it a fit for conventional server-rendered Laravel apps with deep layout/partial/component trees, and a poor fit for API-only services, Inertia/SPA frontends, Livewire/HTMX/Turbo surfaces (where only the initial full-page response carries the injected markup), and any response path that is streamed, JSON, or post-processed by later middleware. The 558 stars indicate historical awareness in the Laravel community, not current viability; archived status, a last release of 2020-10-16 (Laravel 8 support), zero dependents, and a 0.24 opportunity score together mean this should be treated as an individual convenience, never as a platform component.

Integration feasibility. Mechanically trivial on a compatible app: composer require --dev, service-provider auto-discovery, a published config file with an environment flag, and a keyboard shortcut to toggle overlays. The real constraint is version drift. The package was built for the Laravel 6/7/8 era, so illuminate/* constraints, the PHP runtime version, deprecated helpers, and middleware signature changes are all credible blockers on Laravel 9+. Feasibility must be proven by a time-boxed spike against an actual repository, not inferred from a clean composer require. The absence of dependents means no third party is validating compatibility on our behalf.

Technical risk. Four risks dominate. First, accidental exposure: outside local, the tool leaks absolute filesystem paths and can expose an editor-open endpoint — a genuine information-disclosure issue on shared staging or production. Second, response-injection fragility: CSP headers, pre-set Content-Length, streamed responses, and middleware that rebuilds the response can all suppress or corrupt the overlay. Third, attribution accuracy: compiled views, anonymous/class components, and cached view state can produce subtly wrong file mappings. Fourth, unmaintained code: no security or compatibility patches upstream, so every defect becomes ours. The accuracy risk is quieter than breakage and arguably worse for a PM, who may scope work against a view map that is wrong.

Key questions.

  • Which Laravel and PHP versions must be supported, and is there a concrete application to test against?
  • Is the need recurring (ongoing view-triage, onboarding, migration audit) or a one-time exercise?
  • Can we hard-gate activation to local plus an IP allowlist, and prove dev dependencies are stripped from deployment artifacts?
  • Does it survive our middleware order, CSP posture, and response-modification pipeline?
  • How much of the UI is Blade versus Inertia/Livewire, and does the tool cover the part that actually matters?
  • Is Laravel Debugbar, Telescope, Clockwork, Ray, or a View::composer('*') logger sufficient for the same need at lower risk?
  • Are we willing to fork and own this, and what is the explicit removal trigger?

Integration Approach

Stack fit. Target a single conventional Blade-rendered Laravel application, on a version confirmed during the spike. Explicitly exclude API-only services, SPA-first products, and any repository tracking a modern Laravel release without a compatibility fork. Position it as a per-developer local convenience rather than a shared toolchain component, and keep it in require-dev with the exact version pinned in composer.lock.

Migration path. Run a time-boxed spike on a local branch: install with --dev, confirm auto-discovery, publish and review the config, set the enable flag in the developer's own .env, configure the editor URL scheme, and document the enable/disable and cache-clearing steps in the repo README. If it delivers value but fails on current Laravel, fork it, narrow the supported range, and assign a named internal owner. If it does not clearly beat existing tooling, composer remove it and standardize on a maintained alternative. Guard against the spike becoming a de facto dependency through inertia — set the decision date before the spike starts.

Compatibility. Validate Composer constraints against illuminate/* and the PHP runtime; confirm auto-discovery versus manual provider registration; test middleware ordering. Exercise representative pages with nested layouts, chained @includes, anonymous and class components, and cached/compiled views. Clear config:cache and view:clear when toggling settings or after structural refactors. Verify behavior under the actual CSP and security-header configuration before declaring it usable, and check that the toggle shortcut does not collide with existing developer tooling.

Sequencing.

  1. Define the use case, success criteria, and owner — e.g., "halve time-to-file on view-attribution questions during the Q3 view audit."
  2. Run the compatibility spike on one repository with a hard time box.
  3. Add environment gating, documentation, and a View::composer logging fallback so the team is not blocked if the package fails.
  4. Pilot with two or three developers on real triage or audit work.
  5. Decide: adopt dev-only, fork-and-own, or reject.
  6. If adopted, attach a review date or removal trigger tied to the next Laravel major.

None of these steps belong in production release planning, and none should appear on a customer-facing roadmap.

Operational Impact

Maintenance. High relative to value if retained indefinitely. Archived software means Laravel upgrades, Composer constraint negotiation, middleware compatibility, and documentation all become internal work. The codebase is small, so a fork is realistic, but ownership is permanent and must be resourced as such. Used as a short-lived local diagnostic, maintenance cost is effectively zero because the exit is a single composer remove.

Support. There is no upstream support path — no issue triage, no security response, no compatibility commitments. Internal support depends on one or two developers understanding the tool's quirks: editor protocol configuration, the conditions under which injection silently fails, and stale compiled-view behavior. Contain this by keeping usage local-only, publishing the fallback logger snippet, and refusing any team-wide or onboarding-critical dependency. Support burden rises sharply the moment it runs on a shared development server.

Scaling. Not a production scaling concern, since the tool must never serve customer traffic. Organizational scaling is the real limit: rolling it out across many repositories requires per-repo compatibility testing and pinning, which is manual and does not compound. Past a handful of apps, the only coherent path is a shared internal fork with documented setup and an owner — at which point you are maintaining a product rather than consuming one, and the buy-versus-build calculus changes entirely.

Failure modes. Composer dependency conflicts on install; service-provider boot failures on newer Laravel; middleware exceptions breaking local pages; CSP or header conflicts suppressing the overlay; incorrect attribution on component-heavy or compiled templates; drifting line numbers when view:clear is skipped; and the serious one — accidental enablement in shared staging or production, exposing filesystem paths or an editor endpoint. Mitigations are mandatory environment gating, configuration review, IP allowlisting where relevant, and a deployment check that dev dependencies are excluded from artifacts.

Ramp-up. Low for an individual developer: install, enable locally, hover, click, open the file. Moderate for safe organizational use: developers must internalize the archived status, version-pinning discipline, environment gating, the fallback logger, and the boundary between this tool and real observability (Debugbar, Telescope, Clockwork). The TPM responsibility is to make that boundary explicit and to keep the tool from migrating out of local environments by default. Recommendation: approve as a short-lived, local-only diagnostic and audit aid with a named owner, explicit success criteria, and a scheduled fork-or-remove decision; do not adopt it as a supported platform dependency, and do not let it enter any production or shared-environment path.

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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
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