Skip to content

Laravel package that shows the path of each blade file that is loaded into a template

License

Notifications You must be signed in to change notification settings

priestd09/laravel-tracer

 
 

Repository files navigation

Laravel Tracer

Latest Version on Packagist Software License Total Downloads

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
  • If you're completely new to Laravel and want to play around with views/partials/templates etc

Screenshot

Installation

First install this package via Composer:

$ composer require appstract/laravel-tracer --dev

Then add the following class to your service providers list in config/app.php file:

'providers' => [
    // ...
    Appstract\Tracer\TracerServiceProvider::class,
];

Publish the config file:

$ php artisan vendor:publish --provider="Appstract\Tracer\TracerServiceProvider"

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

Basic usage

In app/config/tracer.php, 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

A tracer.js file will be created in your public/js directory. This gets injected at the end of your app <head> section.

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

If you wish to disable Tracer and remove the existing traces, you can simply clear the compiled view files using the php artisan view:clear command.

Testing

$ composer test

Contributing

Contributions are welcome, thanks to y'all :)

About Appstract

Appstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon.

License

The MIT License (MIT). Please see License File for more information.

About

Laravel package that shows the path of each blade file that is loaded into a template

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 80.3%
  • JavaScript 13.5%
  • CSS 6.2%