Laravel View X-Ray is a package for Laravel 5.6 by Marcel Pociot which enables you to peek into your Laravel views and find out which template matches a specific part of the HTML output.
After installing the package it’s enabled by default in development, and then you can hit
Cmd + Shift + X (
Ctrl + Shift + X on Windows). Note, at the time of writing the View X-Ray package depends on jQuery.
The result is a beautiful visual representation of your view, and it’s easy to understand the view hierarchy at a glance now with X-Ray enabled. You can hide the X-Ray UI by hitting the shortcut again or pressing the esc key.
You can disable X-Ray and exclude views with the following configuration options:
<?php return [ /* * Determines if the Xray package should be enabled. */ 'enabled' => env('XRAY_ENABLED', true), /* * If you want to exclude certain views from being processed by Xray, * you can list them here. Be aware that the check only applies to the * root views that you add here. If these views include other views * themselves, they need to be excluded manually. */ 'excluded' => [ // ], ];
You can install Laravel X-Ray in your Laravel 5.6 applications with the following composer command:
Filed in: Laravel Packages
composer require beyondcode/laravel-view-xray --dev
Join 31,000+ others and never miss out on new tips, tutorials, and more.