0035-laravel-dtos
CommunityBuild safe, typed Laravel DTOs with Spatie.
Software Engineering#laravel#dto#transformers#test-factories#spatie-laravel-data#enum casting#carbonimmutable
AuthorMrJmpl3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Laravel codebases often pass around loosely typed arrays and primitives, making data flow fragile, harder to validate, and inconsistent across layers.
Core Features & Use Cases
- Type-safe DTO contracts: Define properties with strict types for clearer boundaries and better IDE support.
- Safer construction with Spatie Laravel Data: Prefer
::from()so casting for enums, dates, and nested DTO collections happens consistently. - Clean transformation and testing patterns: Use dedicated transformer classes for external mappings and create hydrated DTOs for tests with
testFactory().
Quick Start
Ask your AI to recommend a DTO design and mapping approach using Spatie Laravel Data, including when to use ::from() versus transformers and how to structure test factories for your DTOs.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0035-laravel-dtos Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0035-laravel-dtos Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.