solve-x/view-model 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

solve-x/view-model

Composer 安装命令:

composer require solve-x/view-model

包简介

A more structured way of processing requests (inspired by ASP.NET)

关键字:

README 文档

README

Model validation in ASP.NET Core MVC

Note: this library is still in beta. We might make incompatible changes until version 1.

A short example:

<?php

namespace App\ViewModels;

use SolveX\ViewModel\ViewModel;

class RegistrationViewModel extends ViewModel
{
    /**
     * @var string
     */
    public $FirstName;
    
    /**
     * @var int
     */
    public $Age;
}
<?php

namespace App\Controllers;

use App\ViewModels\RegistrationViewModel;

class UserController
{
    public function register(RegistrationViewModel $model)
    {
        // At this point $model is ready to use.
        // In case binding or validation fails, an exception is thrown during model construction.

        // $model->FirstName
        // $model->Age
    }
}

Laravel integration

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固