Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.
/ laravel-tracer Public archive

Shows the path of each blade file loaded in a template

License

Notifications You must be signed in to change notification settings

appstract/laravel-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tracer

Tracer shows the paths of all the blade files that are loaded into your templates. This could be very convenient for a number of reasons; If you're working on a large project with alot of views/partials. New to a project and want to get a quick overview of the structure of pages. Or if you're completely new to Laravel and want to play around with views/partials/templates etc.

Installation

composer require rokr/tracer --dev

First do the composer install then add the following class to your config/app.php service providers list.

Rokr\Tracer\TracerServiceProvider::class,

Publish the config and tracer.js files

php artisan vendor:publish

A tracer.php file will be created in your app/config directory.

A tracer.js file will be created in your public/js directory. Add the script to your HTML head section.

<script type="text/javascript" src="{{ asset('js/tracer.js') }}"></script>

Basic Usage

In app/config tracer.php file, if trace is set to true you see the paths of all the blade files that are loaded into your templates. To remove the paths simply set trace to false. If your views are located at another directory you can set the correct path here.

Toggle traces

Use the keybord shortcut ctrl+z inside the browser to toggle the traces in your app.