laravel-dtos
Laravel DTOs
Never pass multiple primitive values. Always wrap data in Data objects.
Related guides:
- dto-transformers.md - Transform external data into DTOs
- test-factories.md - Create hydrated DTOs for tests
Philosophy
DTOs provide:
- Type safety and IDE autocomplete
- Clear contracts between layers
- Test factories for easy test data generation
- Validation integration
- Transformation from requests to domain objects
Spatie Laravel Data Package
More from leeovery/claude-laravel
laravel-testing
Comprehensive testing patterns with Pest. Use when working with tests, testing patterns, or when user mentions testing, tests, Pest, PHPUnit, mocking, factories, test patterns.
179laravel-quality
Code quality tooling with PHPStan, Pint, and strict types. Use when working with code quality, static analysis, formatting, or when user mentions PHPStan, Pint, quality, static analysis, type safety, code style, linting.
116laravel-architecture
High-level architecture decisions, patterns, and project structure. Use when user asks about architecture decisions, project structure, pattern selection, or mentions how to organize, which pattern to use, best practices, architecture.
99laravel-multi-tenancy
Multi-tenant application architecture patterns. Use when working with multi-tenant systems, tenant isolation, or when user mentions multi-tenancy, tenants, tenant scoping, tenant isolation, multi-tenant.
93laravel-actions
Action-oriented architecture for Laravel. Invokable classes that contain domain logic. Use when working with business logic, domain operations, or when user mentions actions, invokable classes, or needs to organize domain logic outside controllers.
41laravel-controllers
Thin HTTP layer controllers. Controllers contain zero domain logic, only HTTP concerns. Use when working with controllers, HTTP layer, web vs API patterns, or when user mentions controllers, routes, HTTP responses.
41