承接 tsarturi/simpledto 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tsarturi/simpledto

最新稳定版本:v1.0.5

Composer 安装命令:

composer require tsarturi/simpledto

包简介

Simple Data Transfer Objects with FormRequest Validation for Laravel applications

README 文档

README

SimpleDTO

Simple Data Transfer Objects with FormRequest Validation for Laravel applications.

This library was based on https://github.com/WendellAdriel/laravel-validated-dto .

Packagist PHP from Packagist Laravel Version

Features | Installation | Configuration | Generating DTOs | Generating FormRequest

Features

Features:

  • Allows the creation of DTO's easily and quickly.
  • Easy integration into your existing projects.
  • Validation of the data in the same way that it validates the Request.
  • Use FormRequest for validation and authorization.
  • Custom validation messages.
  • Easy data conversion.
  • Definition of default values.

Installation

composer require tsarturi/simpledto

Configuration

Publish the config file:

php artisan vendor:publish --provider="Tsarturi\SimpleDTO\Providers\SimpleDTOServiceProvider" --tag=config

Generating DTOs

You can create DTOs using the make:simpledto command:

php artisan make:simpledto UserDTO

It's create an UserDTO class into App\DTOs folder.

Generating FormRequest

You can create FormRequest class using the make:simpledtoformrequest command:

php artisan make:simpledtoformrequest UserStoreRequest

It's create an UserStoreRequest into Form Request's folder

Using DTO's

<?php

$dto = new UserDTO( [ 'name' => 'name', 'email' => 'email@email.com']);

Using DTO's with FormRequest

<?php

$dto = new UserDTO( [ 'name' => 'name', 'email' => 'email@email.com'], UserStoreRequest::class);

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固