https://github.com/fresns/dto
Fresns data transfer object extension package for easy generation of data rules and inspection of transfer data. Works with Laravel projects.
https://github.com/fresns/dto
dto laravel larvael-dto php
Last synced: about 1 month ago
JSON representation
Fresns data transfer object extension package for easy generation of data rules and inspection of transfer data. Works with Laravel projects.
- Host: GitHub
- URL: https://github.com/fresns/dto
- Owner: fresns
- License: apache-2.0
- Created: 2022-03-05T06:44:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T12:31:20.000Z (almost 2 years ago)
- Last Synced: 2026-02-08T09:36:50.083Z (4 months ago)
- Topics: dto, laravel, larvael-dto, php
- Language: PHP
- Homepage: https://pm.fresns.org/dto/
- Size: 2.05 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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/)
## Sponsors
Fresns is an Apache-2.0-licensed open source project with its ongoing development made possible entirely by the support of these awesome backers. If you'd like to join them, please consider [sponsoring Fresns development](https://github.com/sponsors/fresns).
## 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).
