Debug Laravel views

v2.1.0 2024-04-04 18:08 UTC

This package is auto-updated.

Last update: 2024-06-04 18:31:48 UTC


Adds HTML comments to the start and end of each view, so you can more easily keep track of what's being used.

Inspired by this feature request.


You may have a Blade file like this:

My view file


More stuff

It will be rendered like this:

<!-- Start view: /path/to/views/my-view.blade.php -->
My view file

    <!-- Start view: /path/to/views/sub-view.blade.php -->
    Sub view
    <!-- End view: /path/to/views/sub-view.blade.php -->

More stuff
<!-- End view: /path/to/views/my-view.blade.php -->

Of course, since they are HTML comments, it will look no different unless you view the source.


You can install the package via composer:

composer require pixelfear/laravel-view-debug --dev


This package will be enabled while your app is in debug mode.