Format your blade template using Prettier
This product is a Prettier plugin specifically designed for formatting blade templates in a Laravel project. It provides several features for automatically formatting and organizing code within the blade templates. The plugin supports PHP 8 syntax and follows the PSR-2 coding standard. It also offers the option to automatically sort Tailwind CSS classes based on the configuration in tailwind.config.js.
To install the Prettier plugin for blade templates, you need to add it to your Prettier configuration. Follow the steps below:
Install the Prettier package version compatible with the plugin:
Add the plugin to your Prettier configuration.
The Prettier plugin for blade templates offers a convenient solution for formatting and organizing code within Laravel’s blade templates. It provides automatic indentation inside directives, adds spacing to blade template markers, and supports PHP 8 syntax. Additionally, it follows the PSR-2 coding standard and offers an option to sort Tailwind CSS classes based on the configuration in tailwind.config.js. This plugin is a valuable tool for developers working on Laravel projects, enhancing code readability and maintainability.