X-Ray is a package for 5.6 by Marcel Pociot which enables you to peek into your 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 Cmd + Shift + X (Ctrl + Shift + X on ). Note, at the time of the View X-Ray package depends on jQuery.

Example of the Laravel View X-Ray Package

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  package should be enabled.
     */
    'enabled' => env('_ENABLED', true),

    /*
     * If you want to exclude certain views from being processed by ,
     * you can  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' => [
        //
    ],

];

Learn More

You can install Laravel X-Ray in your Laravel 5.6 applications with the following composer command:

composer require beyondcode/laravel-view-xray --dev

You can learn more by visiting the GitHub repo at beyondcode/laravel-view-xray. Another excellent package by Marcel Pociot, be sure to thank him for his dedication to the Laravel ecosystem!





Source link
thanks you RSS link
( https://laravel-.com/laravel-view-x-ray)

LEAVE A REPLY

Please enter your comment!
Please enter your name here