magentron/laravel-blade-lint is a Laravel package for laravel blade lint console command.
It currently has 16 GitHub stars and 605.025 downloads on Packagist (latest version 2.0.3).
Install it with composer require magentron/laravel-blade-lint.
Discover more Laravel packages by magentron
or browse all Laravel packages to compare alternatives.
Last updated
Laravel console command to check syntax of blade templates.
Add package via composer:
composer require --dev magentron/laravel-blade-lint
For Laravel version < 5.5, edit config/app.php, add the following to
the providers array:
Magentron\BladeLint\Providers\ServiceProvider::class,
From the command line, run:
php artisan blade:lint
It attempts to determine automatically the number of CPU cores that your system has and to use all cores by starting child worker processes (requires the PHP POSIX extension).
You can use different levels of verbosity for somewhat more detailed information.
Standard help output:
$ php artisan blade:lint -h
Description:
Laravel Blade Lint - syntax checking of blade templates
Usage:
blade:lint [options] [--] [<path>...]
Arguments:
path
Options:
--debug Enable debug output, which consists of the compiled templates (PHP code)
-p, --processes[=PROCESSES] The number of test processes to run. [default: "auto"]
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Development of this package requires PHP 8 or higher.
# Install dependencies
composer install
# Run tests
make test
# Run tests with coverage report
make test-coverage
The coverage report will be generated in build/coverage/.
# Run all static analysis tools
make static-analysis
# Individual tools
make phpstan
make psalm
make php-cs-fixer-dry
If you find a bug please report a bug on GitHub:
https://github.com/Magentron/laravel-blade-lint/issues.
Jeroen Derks, a.k.a Magentron
Laravel Blade Lint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Laravel Blade Lint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Laravel Blade Lint. If not, see http://www.gnu.org/licenses/.