✅
Laravel Validated DTO
CtrlK
View on GitHub
  • ✅Validated DTO for Laravel
  • 🚀Getting Started
    • Installation
    • Configuration
    • Upgrade Guide
    • Changelog
  • 😎The Basics
    • Generating DTOs
    • Defining DTO Properties
    • Defining Validation Rules
    • Creating DTO Instances
    • Accessing DTO Data
    • Defining Default Values
    • Transforming DTO Data
    • Mapping DTO properties
    • Simple DTOs
    • Resource DTOs
    • Wireable DTOs
    • Lazy Validation
    • Generating TypeScript Definitions
  • 🎨Customize
    • Custom Error Messages and Attributes
    • Custom Exceptions
  • 🧪Type Casting
    • Introduction
    • Available Types
    • Create Your Own Type Cast
    • Casting Eloquent Model properties to DTOs
Powered by GitBook
On this page

Was this helpful?

  1. 😎The Basics

Wireable DTOs

If you're using Laravel Livewire, you can turn your DTOs into wireable DTOs by adding the WendellAdriel\ValidatedDTO\Concerns\Wireable trait to your DTOs:

class UserDTO extends ValidatedDTO
{
    use Wireable;
    // Your DTO code...
}
PreviousResource DTOsNextLazy Validation

Last updated 8 months ago

Was this helpful?