JourneyWriting2022

Running Laravel Pint in PhpStorm

To get Laravel Pint to automatically reformat your PHP code on save in PhpStorm, configure it as a file watcher to run as an "action on save".

  1. Turn off PhpStorm's built-in code formatting for PHP.

  1. Create a new File Watcher for Laravel Pint:

  1. Use the following file watcher settings:

  • Program: $ProjectFileDir$/vendor/bin/pint

  • Arguments: $FileRelativePath$

  • Output paths to refresh: $FileRelativePath$

  • Working directory: $ProjectFileDir$