DEV Community

Discussion on: VSCode for PHP and Laravel

Collapse
 
msamgan profile image
Mohammed Samgan Khan

I agree for most of the part but if you are using laravel, instead of using Prettier you should use laravel pint. Here is a way you can use laravel pint in your vscode setup
codebysamgan.com/how-to-add-larave.... Moreover I also created an extension for the same purpose, you should check out.
marketplace.visualstudio.com/items...

Collapse
 
sean_kegel profile image
Sean Kegel

I use both Prettier and Pint. I use Prettier for formatting frontend code like React/Vue. However, I also use it for Blade templates since Pint does not format Blade templates.

Prettier can also sort Tailwind classes as well which I prefer.

All my normal PHP files are formatted with Pint, Prettier does not touch those.

Collapse
 
msamgan profile image
Mohammed Samgan Khan

yes combining them together is a great idea. I do the same.