Tinkerwell 4 is out now! Get the most popular PHP Scratchpad application. Tinkerwell 4 is out now: Get the most popular PHP Scratchpad with Detail Dive, AI code generation and more. Learn more
The package includes a default configuration of the linter based on the Vale and the WriteGood styles, so that you can start linting right away!
The linter supports two different modes: translation linting and blade template linting.
To lint all blade templates of your project, call the following command from your project root:
~ php artisan lint:blade
Linting all templates of your app can take a while, so it will ask you for confirmation before it starts.
As an alternative, you can lint either a single blade template by providing the template key just like you would inside laravel:
~ php artisan lint:blade auth.login
Or you exclude one or several view directories by using the --exclude
option:
~ php artisan lint:blade --exclude=auth,vendor
If you want to lint all translations of your application, open up your CLI in the Laravel project root and execute the following command:
~ php artisan lint:translation
This can be quite time-consuming for big applications, so if you want to restrict the linting to a certain namespace*, provide it as a parameter:
~ php artisan lint:translation auth
If you want to lint the translations of multiple namespaces, add them as further parameters:
~ php artisan lint:translation auth passwords pagination
passwords
namespace are located in resources/lang/en/passwords.php
.Instead of evaluating the results in the CLI as a table you for further processing or storing by appending a --json
flag to the command:
~ php artisan lint:translation --json
The result file will be saved in the storage
folder of your application.
Don’t waste time building admin panels for your Laravel applications. Let Invoker do the hard work for you. No coding. No setup. No stress.
Learn more