crhg/laravel-config-validator 问题修复 & 功能扩展

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

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

crhg/laravel-config-validator

Composer 安装命令:

composer require crhg/laravel-config-validator

包简介

Add config:validate command to laravel app which validate configuration.

README 文档

README

Validate the configuration of the Laravel application.

INSTALL

composer require crhg/laravel-config-validator

USAGE

PREPARE RULES

Implement the Crhg\ConfigValidator\Interfaces\ConfigValidationRuleProvider interface in the service provider class.

Define getConfigValidationRule() function. It has no arguments and returns an array of validation rules. Rules are written in the same way as validation for request.

EXAMPLE

class AppServiceProvider extends ServiceProvider implements ConfigValidationRuleProvider
{
    public function getConfigValidationRule()
    {
        return [
            'app.foo' => 'required',
        ];
    }
}

PERFORM CHECK

Validate the current configuraiton using the rules prepared by executing the config:validate artisan command.

% php artisan config:varidate
app.foo: The app.foo field is required.

It will display a message if there is a problem.

It exists with status 1 if some errors are found.

BUGS

  • Sometimes the wording of a message is odd because the validator for the request is used.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固