What problem does it solve?
This Skill solves inconsistent and tightly-coupled backend repository implementations by providing a practical, repeatable repository pattern for the Petrvs-PGD codebase.
Core Features & Use Cases
- Repository design guidance: Create expressive repository contracts, decide what belongs in repositories vs services, and keep read/write behavior coherent in Eloquent repositories.
- Laravel/Petrvs implementation flow: Generate new repositories with the intended artisan command, register bindings in the RepositoryServiceProvider, and use DTOs for composed return data.
- Quality safeguards: Add integration-tenant focused tests and run Pest and PHPStan on the modified repository/provider paths.
- Decision rules and pitfalls: Avoid injecting repositories directly into controllers except in a narrow read-only case, and avoid large associative arrays when domain shapes are stable.
Quick Start
Ask an AI to refactor your Petrvs backend repository by proposing a repository contract, the Eloquent read/write repository implementation using DTOs, the RepositoryServiceProvider bindings, and the integration-tenant tests to validate the behavior.