Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mcbates's avatar

How to prettify blade files in CI building pipeline?

When working as a team on Laravel, not everyone does the same formatting in the blade files - especially indentation. Also, auto formatters' output varies from editor (and plugin) to editor.

I wish there was a way to prettify our blade files when running our CI pipeline on Gitlab/Bitbucket. I envision it like this: when a PR is merged onto master, blade files get autoformatted (where you define the settings in a config file) and an auto commit ("Fix: Blade Formatting") gets added.

Whenever you pull from master, you get a well-formatted project.

Is there anything like this, either as a NPM/composer/cli package or via a 3rd party service? If not: How do you guys handle the formatting issue in a team?

0 likes
3 replies
Sergiu17's avatar

How do you guys handle the formatting issue in a team?

IDEs usually have shortcuts for reformatting the code, in settings you may configure however you want, for example one tab or 4 spaces, or 5 spaces, any other way you want

Please or to participate in this conversation.