New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mindtwo/laravel-blade-spaceless

Blade @spaceless directive that strips whitespace between HTML tags at render time.
38,474 2
Install
composer require mindtwo/laravel-blade-spaceless
Latest Version:1.5
PHP:^8.2
Laravel:10 – 13
Older releases:5 – 9
License:MIT
Last Updated:May 21, 2026
Links: GitHub  ·  Packagist
Maintainer: mindtwo

Spaceless Larvel Blade Directive

Latest Stable Version Total Downloads MIT Software License

Installation

You can install the package via composer:

composer require mindtwo/laravel-blade-spaceless

The package will register itself automatically.

Optionally you can publish the package configuration using:

php artisan vendor:publish --provider=mindtwo\\Spaceless\\SpacelessServiceProvider

How to use?

The new blade directives @spaceless and @endspaceless are now available in your blade views:

@spaceless
<!DOCTYPE html>
<html>
    <head></head>
    <body></body>
</html>
@endspaceless

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email info@mindtwo.de instead of using the issue tracker.

Credits

License

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

Related Packages

devmcc/blade-extended

Expands the blade functionality of the Laravel framework with additional directi...

19 0
hedronium/spaceless-blade

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

677,404 31
yamadashy/laravel-blade-minify-directive

@minify directive to partially compress HTML.

1,437 7
fuzaylov/bootstrap

Helper library to create Bootstrap html fields

115 6
tungpham42/laravel-blade-minify-directive

@minify directive to partially compress HTML.

6 1

Version History

Version Released PHP Laravel License
1.5 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
1.4.1 6.*|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
1.4 6.*|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0 MIT
1.3.1 6.*|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0 MIT
1.3 6.*|^7.0|^8.0|^9.0|^10.0|^11.0 MIT