root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space indent_size = 4 trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false [*.{yml,yaml,js,ts,vue,json}] indent_size = 2 [docker-compose.yml] indent_size = 4

PHP linter


From https://github.com/laravel/pint

composer require laravel/pint --dev

To execute command global add to system composer

composer global require laravel/pint --dev
"scripts": {
"format": [
touch pint.json

Update this with your rules from https://mlocati.github.io/php-cs-fixer-configurator, you can check Configs for example.

PHP CS Fixer

Add this dependency to this project

composer require --dev friendsofphp/php-cs-fixer

Create .php-cs-fixer.dist.php

touch .php-cs-fixer.dist.php

You can check Configs for example.

Add this to .gitignore


Execute this command to fix all files

./vendor/bin/php-cs-fixer fix

Check Config to add this to composer.json for automation.

Laravel IDE Helper

composer require --dev barryvdh/laravel-ide-helper
php artisan vendor:publish --provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" --tag=config
php artisan ide-helper:generate
php artisan ide-helper:models --nowrite
php artisan ide-helper:meta
php artisan ide-helper:eloquent

Check Config to add this to composer.json for automation.


From https://github.com/artesaos/seotools

composer require artesaos/seotools
php artisan vendor:publish --provider="Artesaos\SEOTools\Providers\SEOToolsServiceProvider"


From https://github.com/beyondcode/laravel-dump-server

composer require --dev beyondcode/laravel-dump-server
php artisan vendor:publish --provider="BeyondCode\DumpServer\DumpServerServiceProvider"


From https://github.com/nunomaduro/larastan

composer require nunomaduro/larastan --dev
touch phpstan.neon
includes: - ./vendor/nunomaduro/larastan/extension.neon parameters: tmpDir: .phpstan paths: - app # The level 9 is the highest level level: 5 checkMissingIterableValueType: false


From https://github.com/pestphp/pest

composer require pestphp/pest --dev --with-all-dependencies
composer require pestphp/pest-plugin-laravel --dev
php artisan pest:install


From https://github.com/spatie/phpunit-watcher

composer global require spatie/phpunit-watcher
touch .phpunit-watcher.yml
watch: directories: - app - config - tests fileMask: '*.php' notifications: passingTests: false failingTests: false phpunit: binaryPath: ./vendor/bin/pest arguments: '--stop-on-failure' timeout: 180
phpunit-watcher watch

Log viewer

From https://github.com/opcodesio/log-viewer

composer require opcodesio/log-viewer
php artisan vendor:publish --tag="log-viewer-config"

To update route check 'route_path' => 'log-viewer'

composer.json scripts

You can check Configs for example.

Blade Formatter

From Laravel Blade formatter, install Extension from Visual Studio Code.

"[blade]": {
"editor.defaultFormatter": "shufo.vscode-blade-formatter",
"editor.tabSize": 4,
"editor.formatOnSave": true
Open settings.json. Execute Ctrl + Shift + P to open **Preferences: Open settings (JSON).

To find other settings with Blade formatter, check page extension.