ia-php-laravel
Installation
SKILL.md
PHP & Laravel Development
Code Style
declare(strict_types=1)in every file- Happy path last -- guards and errors first, success at the end. Early returns, no
else. - Comments explain why, never what. Never comment tests. If code needs a "what" comment, rename or restructure.
- No single-letter variables --
$exceptionnot$e,$requestnot$r ?stringnotstring|null. Always specifyvoid. Import classnames, never inline FQN.- Validation uses array notation
['required', 'email']for easier custom rule classes - PHPStan level 8+ (
phpstan analyse --level=8); aim for 9 on new projects.@phpstan-type/@phpstan-paramfor generic collection types.