Download the PHP package spatie/laravel-blade-comments without Composer

On this page you can find all versions of the php package spatie/laravel-blade-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-blade-comments

Add debug comments to your rendered output

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

When looking at the HTML of a rendered page, it might not be obvious to you anymore which Blade view is responsible for which HTML. This package will add HTML before and after each rendered view, so you immediately know to which Blade view / component to go to change the output.

When you inspect a part of the page using your favourite browser's dev tools, you'll immediately see which Blade view rendered that particular piece of content. Here's a demo where we inspected the breadcrumbs on our own company site. It is immediately clear that the breadcrumbs are rendered by the front.pages.docs.partials.breadcrumbs Blade view.

screenshot

At the top of the HTML document, we'll also add some extra information about the topmost Blade view and the request.

screenshot

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

You can optionally publish the config file with:

This is the content of the published config file:

Usage

After the package is installed, you'll immediately see that HTML comments are injected at the start and end of every Blade view.

Excluding views

Sometimes you might not want to have an HTML comment being wrapped around an include. For example when you use a partial to add some CSS to a page. In these cases you can add views to the excludes.includes array in the config file.

Using your own Blade Commenters

You can easily extend the package to add more comments. In the blade_commenters key of the blade_commenters config file, you can add your own BladeCommenter. A BladeCommenter is any class that implements the following interface:

Take a look at the BladeCommenters that ship with the package for an example.

Using your own request commenters

The package adds useful information about the request at the top of the HTML page. This is done by the so called request commenters . You'll find the default request commenters in the request_commenters key of the blade-comments config file.

You can add your own request commenters there. A RequestCommentor is any class that implements the following interface:

If the comment function returns a string, it will be injected at the top of the HTML document. Take a look at the request commenters that ship with the package for an example.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-blade-comments with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^9.28|^10|^11.0
illuminate/view Version ^9.28|^10|^11.0
spatie/laravel-package-tools Version ^1.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spatie/laravel-blade-comments contains the following files

Loading the files please wait ....