Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel auto formatting for Netbeans

I'm using Laravel on Netbeans but any time that I use auto format (alt shift f) it messes up my code formatting. I know that I can edit each setting individually in Netbeans but that could take hours and never be complete. Is there an easy way for Netbeans to adapt to my files, or is there a settings file somewhere that I can import into Netbeans?

The only one I could find is this:

http://forumsarchive.laravel.io/viewtopic.php?id=13032

But it doesnt work. It messes up my blade templates and my routes file gets formatted differently.

Thanks!

like image 754
Citizen Avatar asked Jul 28 '14 18:07

Citizen


1 Answers

For Laravel on PHPStorm I'm using php-cs-fixer plugin. For me, It's perfect toool for formatting.

Here you can find this plugin for Netbeans.

Also, you can install php-cs-fixer on your machine and run it from console. Git repository of php-cs-fixer.

like image 153
Viktor Avatar answered Sep 28 '22 20:09

Viktor