PHPackages                             zae/laravel-view-xray - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. zae/laravel-view-xray

ActiveLibrary[Templating &amp; Views](/categories/templating)

zae/laravel-view-xray
=====================

Take a look into your Laravel views.

2.0.0(7y ago)09MITPHPPHP ^7.0

Since Oct 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Zae/laravel-view-xray)[ Packagist](https://packagist.org/packages/zae/laravel-view-xray)[ Docs](https://github.com/zae/laravel-view-xray)[ RSS](/packages/zae-laravel-view-xray/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (2)Used By (0)

Xray - Take a look into your Laravel views
==========================================

[](#xray---take-a-look-into-your-laravel-views)

[![Latest Version on Packagist](https://camo.githubusercontent.com/81293800f6bd02c87816cda9b7c8bf6e62fb67251a824cf68bd698ad11b630a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a61652f6c61726176656c2d766965772d787261792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zae/laravel-view-xray)[![Build Status](https://camo.githubusercontent.com/657ef127c8479e358360b21c4f8d4cb232bfb7ced3b3c808ba233baf53ae01ca/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a61652f6c61726176656c2d766965772d787261792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/zae/laravel-view-xray)[![Quality Score](https://camo.githubusercontent.com/36a6a3abb707eb995e8844dab00bf29db355330202bc4b8788d3b9d1b6c5dae3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7a61652f6c61726176656c2d766965772d787261792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/zae/laravel-view-xray)[![Total Downloads](https://camo.githubusercontent.com/c32a2683ac7959c8c037a329d8d3ace98a64dc740e87375539e2d95af057fd9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a61652f6c61726176656c2d766965772d787261792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zae/laravel-view-xray)

When your Laravel project grows, so do the Laravel views. Sometimes it might be hard to figure out, which part of the output HTML was rendered using which template. With this package, you can take a peek into your Laravel views and find out which template is responsible for which part of the output HTML.

[![Example output](https://camo.githubusercontent.com/4cfb68f777b0677ffc245de04d88f85c7ce0b93ddc65716e9561025ab7ae2f76/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f787261792f787261792e706e67)](https://camo.githubusercontent.com/4cfb68f777b0677ffc245de04d88f85c7ce0b93ddc65716e9561025ab7ae2f76/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f787261792f787261792e706e67)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require zae/laravel-view-xray --dev
```

The package is enabled by default - so all you need to do is visit your application in the browser and hit the Xray shortcut.

- Windows: CTRL + Shift + X
- OSX: CMD + Shift + X

This toggles the Xray view, where you can see which view (and optionally section) rendered the visual output.

Disabling Xray
--------------

[](#disabling-xray)

You can disable Xray by setting an environment variable called `XRAY_ENABLED` to `false`.

Excluding views
---------------

[](#excluding-views)

If you want to exclude certain views from being processed by Xray, you can do this by adding them to the configuration file.

Publish the configuration file using:

```
php artisan vendor:publish --provider=BeyondCode\\ViewXray\\ViewXrayServiceProvider
```

This will publish a file called `xray.php` in your `config` folder.

This is the content of the configuration file:

```
