mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
* feat: add laravel skills * docs: fix laravel patterns example * docs: add laravel api example * docs: update readme and configure-ecc for laravel skills * docs: reference laravel skills in php rules * docs: add php import guidance * docs: expand laravel skills with more pattern, security, testing, and verification examples * docs: add laravel routing, security, testing, and sail guidance * docs: fix laravel example issues from code review * docs: fix laravel examples and skills per review findings * docs: resolve remaining laravel review fixes * docs: refine laravel patterns and tdd guidance * docs: clarify laravel queue healthcheck guidance * docs: fix laravel examples and test guidance * docs: correct laravel tdd and api example details * docs: align laravel form request auth semantics * docs: fix laravel coverage, imports, and scope guidance * docs: align laravel tdd and security examples with guidance * docs: tighten laravel form request authorization examples * docs: fix laravel tdd and queue job examples * docs: harden laravel rate limiting and policy examples * docs: fix laravel pagination, validation, and verification examples * docs: align laravel controller response with envelope * docs: strengthen laravel password validation example * docs: address feedback regarding examples * docs: improve guidance and examples for pest usage * docs: clarify laravel upload storage and authorization notes * docs: tighten up examples
34 lines
1.2 KiB
Markdown
34 lines
1.2 KiB
Markdown
---
|
|
paths:
|
|
- "**/*.php"
|
|
- "**/composer.json"
|
|
---
|
|
# PHP Patterns
|
|
|
|
> This file extends [common/patterns.md](../common/patterns.md) with PHP specific content.
|
|
|
|
## Thin Controllers, Explicit Services
|
|
|
|
- Keep controllers focused on transport: auth, validation, serialization, status codes.
|
|
- Move business rules into application/domain services that are easy to test without HTTP bootstrapping.
|
|
|
|
## DTOs and Value Objects
|
|
|
|
- Replace shape-heavy associative arrays with DTOs for requests, commands, and external API payloads.
|
|
- Use value objects for money, identifiers, date ranges, and other constrained concepts.
|
|
|
|
## Dependency Injection
|
|
|
|
- Depend on interfaces or narrow service contracts, not framework globals.
|
|
- Pass collaborators through constructors so services are testable without service-locator lookups.
|
|
|
|
## Boundaries
|
|
|
|
- Isolate ORM models from domain decisions when the model layer is doing more than persistence.
|
|
- Wrap third-party SDKs behind small adapters so the rest of the codebase depends on your contract, not theirs.
|
|
|
|
## Reference
|
|
|
|
See skill: `api-design` for endpoint conventions and response-shape guidance.
|
|
See skill: `laravel-patterns` for Laravel-specific architecture guidance.
|