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 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

Take a look into your Laravel views.

Frequently asked questions about Laravel View Xray
What is beyondcode/laravel-view-xray used for?
Laravel View Xray is a development-time debugging package from BeyondCode that overlays Blade attribution onto your rendered HTML. Hover a region of the page in the browser and Xray shows which Blade view file produced it, along with the data that view received. It hooks the view-rendering pipeline and wraps each rendered view in an annotated element, so it is aimed at conventional server-rendered Laravel apps with deep layouts, partials, and component trees.
How do I install laravel-view-xray?
Install it as a dev dependency with composer require --dev beyondcode/laravel-view-xray. The service provider is auto-discovered, and you publish the config file with php artisan vendor:publish to review the enable flag and editor URL scheme. Then set the enable option in your own .env so activation stays local to your machine. Pin the exact version in composer.lock, since the package has not been updated since 2020.
Does laravel-view-xray support Laravel 9, 10, 11, or 12?
Officially no. The last release was on 2020-10-16 and targets the Laravel 6, 7, and 8 era, so illuminate/* constraints, PHP version requirements, deprecated helpers, and middleware signature changes are credible blockers on Laravel 9 and above. There are no dependents validating compatibility on your behalf, so you must prove it with a time-boxed spike on the actual repository rather than assuming a clean composer require means it works.
Is laravel-view-xray safe to run in production?
No, it should never be enabled outside local development. Beyond rendering overlays, it can leak absolute filesystem paths into HTML and expose an editor-open endpoint, which is a genuine information-disclosure issue on shared staging or production. Hard-gate activation to the local environment plus an IP allowlist, keep it in require-dev, and verify dev dependencies are stripped from deployment artifacts.
How do I turn the view xray overlay on and off?
Activation is controlled by the published config file and an environment flag, and there is a keyboard shortcut to toggle the overlay at runtime. Document the enable and disable steps, plus any view cache clearing, in your repository README so other developers are not guessing. Because the package injects markup into responses, re-check that it is disabled whenever you switch environments.
Does laravel-view-xray work with Livewire, Inertia, or API responses?
It is a poor fit for those surfaces. Only the initial full-page HTML response carries the injected markup, so Livewire, HTMX, and Turbo updates will not show fresh attribution, and Inertia or SPA frontends plus JSON and streamed responses get nothing useful. It is designed for conventional Blade-rendered apps, so if most of your UI is Inertia or Livewire, this tool will not cover the part that matters.
Why is the laravel-view-xray overlay not showing up on my page?
Common causes are a Content-Security-Policy that blocks the injected assets, a pre-set Content-Length header, streamed responses, or later middleware that rebuilds the response body. Cached or compiled views can also produce stale or subtly wrong file mappings. Test against a minimal route first, then check your middleware order and CSP posture before assuming the package is broken.
How is laravel-view-xray different from Laravel Debugbar, Telescope, or Clockwork?
Debugbar, Telescope, and Clockwork give you request-level insight such as queries, timings, and logs, while Xray specifically maps rendered HTML regions back to Blade files and their view data. If your problem is identifying which view rendered a region and what it received, Xray is more direct. For general performance and query debugging the others are lower risk, and Ray or a simple View::composer('*') logger can cover parts of the same need without injecting HTML.
Can laravel-view-xray show what data each Blade view receives?
Yes, the overlay reports the view file for a rendered region and the data passed to it, which makes it easier to debug view composers, includes, and missing or unexpected variables. That said, attribution can be inaccurate for compiled views, anonymous or class-based components, and cached view state, so treat the output as a strong hint rather than ground truth. Verify anything surprising against the actual view file.
Is laravel-view-xray still maintained, or should I fork it?
The repository is archived, the last release was 2020-10-16, it has zero dependents, and there are no upstream security or compatibility patches, so every defect becomes yours. Treat it as a per-developer local convenience, never as a platform component. Be prepared to fork and own it if you need it on a modern Laravel version, and set an explicit removal trigger so the fork does not quietly become permanent.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo