Make Model PHPdocs created by --write option compatible with Laravel Pint
Author: mark-audienceCreated Nov 26, 2024Updated Mar 24, 2026
Labelsenhancement
Laravel Pint runs CS Fixer to apply a clean code style.
Updating the Mixins keeps introducing code that does not agree with Pint.
The block starts with 2 empty lines which Pint removes,
The Pint adds an extra line between the blocks of @property-read and @method static blocks,
followed by another empty line above the line * @mixin \Eloquent
Steps to reproduce:
- install Pint
composer require laravel/pint --dev - Write PHPdocs
php artisan ide-helper:models --write - Make Pint clean up code
./vendor/bin/pint app/Models
Ideally step 3 should result in 0 file changes.
Source: barryvdh/laravel-ide-helper