fresns/dto
Composer 安装命令:
composer require fresns/dto
包简介
Fresns data transfer object extension package for easy generation of data rules and inspection of transfer data. Works with Laravel projects.
README 文档
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/
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.
Install
To install through Composer, by run the following command:
composer require fresns/dto
Generate DTO
// 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/10.x/validation#available-validation-rules
- https://laravel.com/docs/11.x/validation#available-validation-rules
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- 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.
fresns/dto 适用场景与选型建议
fresns/dto 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.2k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 03 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dto」 「data-transfer-object」 「fresns」 「laravel-dto」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fresns/dto 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fresns/dto 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fresns/dto 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Data transfer objects with batteries included
PHP library for the MUMSYS project
A simple library that allows transform any kind of data to native php data or whatever
Data transfer objects with batteries included
Return original response alongside with the DataTransferObject
Argonaut is a lightweight Data Transfer Object (DTO) package for Laravel that supports nested casting, recursive serialization, and validation out of the box. Ideal for service layers, APIs, and clean architecture workflows.
统计信息
- 总下载量: 2.2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 22
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2022-03-05