https://github.com/wendelladriel/laravel-validated-dto
Data Transfer Objects with validation for Laravel applications
https://github.com/wendelladriel/laravel-validated-dto
data-transfer-object dto laravel validation
Last synced: 30 days ago
JSON representation
Data Transfer Objects with validation for Laravel applications
- Host: GitHub
- URL: https://github.com/wendelladriel/laravel-validated-dto
- Owner: WendellAdriel
- License: mit
- Created: 2022-12-09T13:00:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T13:33:58.000Z (2 months ago)
- Last Synced: 2025-04-03T13:41:10.158Z (about 1 month ago)
- Topics: data-transfer-object, dto, laravel, validation
- Language: PHP
- Homepage: https://wendell-adriel.gitbook.io/laravel-validated-dto/
- Size: 14.1 MB
- Stars: 677
- Watchers: 6
- Forks: 39
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![]()
Validated DTO for Laravel
Data Transfer Objects with validation for Laravel applications
**Data Transfer Objects (DTOs)** are objects that are used to transfer data between systems. **DTOs** are typically used in applications to provide a simple, consistent format for transferring data between different parts of the application, such as **between the user interface and the business logic**.
This package provides a base **DTO Class** that can **validate** the data when creating a **DTO**. But why should we do this instead of using the standard **Request** validation?
Imagine that now you want to do the same action that you do in an endpoint on a **CLI** command per example. If your validation is linked to the Request you'll have to implement the same validation again.
With this package you **define the validation once** and can **reuse it where you need**, making your application more **maintainable** and **decoupled**.
## Documentation
[![Docs Button]][Docs Link] [![DocsRepo Button]][DocsRepo Link]## Installation
```bash
composer require wendelladriel/laravel-validated-dto
```## Credits
- [Wendell Adriel](https://github.com/WendellAdriel)
- [All Contributors](../../contributors)## Contributing
Check the **[Contributing Guide](CONTRIBUTING.md)**.
[Docs Button]: https://img.shields.io/badge/Website-0dB816?style=for-the-badge&logoColor=white&logo=GitBook
[Docs Link]: https://wendell-adriel.gitbook.io/laravel-validated-dto/
[DocsRepo Button]: https://img.shields.io/badge/Repository-3884FF?style=for-the-badge&logoColor=white&logo=GitBook
[DocsRepo Link]: https://github.com/WendellAdriel/laravel-validated-dto-docs