# Fresns DTO **Repository Path**: fresns/dto ## Basic Information - **Project Name**: Fresns DTO - **Description**: Fresns 数据传输对象扩展包,用于便捷的生成数据规则和检查传输数据。适用于 Laravel 项目。 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://pm.fresns.org/dto/ - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-03-04 - **Last Updated**: 2024-03-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: DTO, Laravel, Laravel-DTO, PHP ## README

PHP License

## About DTO Fresns **data transfer object** extension package for easy generation of data rules and inspection of transfer data. Works with **Laravel** projects. - Guide: [https://pm.fresns.org/dto/](https://pm.fresns.org/dto/) ## Install To install through Composer, by run the following command: ```bash composer require fresns/dto ``` ## Generate DTO ```php // Generate a new DTO (path: /app/DTO/) php artisan make:dto BaseDTO // Generate a new DTO(to the specified path) php artisan make:dto BaseDTO --path /app/Fresns/Panel ``` See the Laravel documentation for the rules that can be used for validation. - [https://laravel.com/docs/9.x/validation#available-validation-rules](https://laravel.com/docs/9.x/validation#available-validation-rules) - [https://laravel.com/docs/10.x/validation#available-validation-rules](https://laravel.com/docs/10.x/validation#available-validation-rules) - [https://laravel.com/docs/11.x/validation#available-validation-rules](https://laravel.com/docs/11.x/validation#available-validation-rules) ## Contributing You can contribute in one of three ways: 1. File bug reports using the [issue tracker](https://github.com/fresns/dto/issues). 2. Answer questions or fix bugs on the [issue tracker](https://github.com/fresns/dto/issues). 3. Contribute new features or update the wiki. *The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.* ## License Fresns DTO is open-sourced software licensed under the [Apache-2.0 license](https://github.com/fresns/dto/blob/main/LICENSE).