laravel-guidelines
Installation
SKILL.md
Laravel Guidelines
This document outlines best practices for building robust, maintainable, and modern Laravel applications. Focus is placed on clean architecture, efficient database usage, and reliable testing strategies.
1. General Principles
- Correctness > Clarity > Consistency > Performance > Cleverness.
- KISS: Keep It Simple, Stupid. Avoid over-engineering.
- DRY (Don't Repeat Yourself): Extract shared logic but be pragmatic. Duplication is cheaper than the wrong abstraction.
- SOLID: Adhere to SOLID principles, with particular emphasis on Single Responsibility (SRP) in classes and methods.
- Strict Typing: Use PHP's strict typing (
declare(strict_types=1);) to ensure type safety. - Config/Env: Prefer
config()and.envvariables over hardcoded strings to ensure flexibility across environments.
2. Modern PHP Features
Leverage modern PHP features for cleaner, more expressive code:
Related skills