An opinionated blade template formatter for Laravel that respects readability
The blade-formatter is an opinionated blade template formatter for Laravel that aims to provide a formatter for blade templates, as there is no official blade template formatter available. It offers features such as automatic indentation of markup inside directives, automatic spacing for blade templating markers, support for PHP 8 features, PSR-2 support, and automatic Tailwind CSS class sorting.
To install the blade-formatter, you can use yarn or global docker. Here are the installation steps:
Install the package globally using yarn:
yarn global add blade-formatter
Or, install the package using global docker:
docker pull docker.pkg.github.com/blade-formatter/blade-formatter/blade-formatter:latest
The blade-formatter is an opinionated blade template formatter for Laravel that offers various features to format blade templates. It provides automatic indentation of markup inside directives, adds spacing to blade templating markers, supports PHP 8 features and PSR-2 format inside directives. It also includes the ability to automatically sort Tailwind CSS classes. The blade-formatter can be installed using yarn or global docker.