Adds the @spaceless tag to Blade. (works like in Twig)

v3.0.0 2019-08-24 06:23 UTC

This package is not auto-updated.

Last update: 2024-05-11 15:29:56 UTC


Latest Stable Version License Total Downloads

Adds a @spaceless tag to Laravel's Blade templating engine.

In twig you could do:

{% spaceless %}
{% endspaceless %}

Do you miss Twig's {% spaceless %} tag while working with Laravel's Blade?

With this package you can do this in Laravel's Blade too (without using Twig, of course). Example:


Example Output:



Get the Package

For Laravel 5.1 or above, get version 2, by adding the following lines to composer.json

"hedronium/spaceless-blade": "~2.0"

For Laravel 4 or above, get version 1 with latest patches, by adding the following lines to composer.json

"hedronium/spaceless-blade": "~1.0"

Register the Service Provider

For Laravel 5.4 and below, open up your app.php in your config folder, and add the following line to your providers list like:

'providers' => array(