jacobjoergensen / laravel-fmt
Formatter for PHP, Blade, and Livewire 4 with first-class Tailwind class sorting. It also formats HTML, CSS, Markdown, JSON, YAML, and XML.
Package info
github.com/JacobJoergensen/laravel-fmt
Language:Go
pkg:composer/jacobjoergensen/laravel-fmt
Requires
- php: >=8.3
- composer-runtime-api: ^2.2
- ext-curl: *
- ext-phar: *
- composer/ca-bundle: ^1.5
Requires (Dev)
None
Suggests
- ext-zip: Required on Windows only, to unpack the release archive
Provides
None
Conflicts
None
Replaces
None
README
Laravel Fmt formats PHP, Blade, and Livewire 4, with first-class Tailwind class sorting. It also formats HTML, CSS, Markdown, JSON, YAML, and XML.
Warning
Status: beta. Not recommended for production code yet. Expect rough edges, and please report issues.
Why Laravel Fmt?
Blade, Livewire 4 single-file components, and Tailwind class sorting in one binary. No Node, no Prettier plugin. Drop it in next to your pint.json, .php-cs-fixer.php or mago.toml and it adopts the formatting settings it understands.
Get Started
composer require jacobjoergensen/laravel-fmt --dev
Format your project:
vendor/bin/laravel-fmt
With no arguments it walks the project. Pass paths to narrow it down, or --check to report what would change without writing:
vendor/bin/laravel-fmt app/Models resources/views vendor/bin/laravel-fmt --check
Documentation
Find the full documentation at laravel-fmt.com.
Contributing
See CONTRIBUTING.md for filing bugs and submitting PRs.
License
MIT. See LICENSE.