2017 © Pedro Peláez
 

library laravel-config-validator

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

image

crhg/laravel-config-validator

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

  • Tuesday, April 10, 2018
  • by crhg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 33 % Grown

The README.md

DESCRIPTION

Validate the configuration of the Laravel application., (*1)

INSTALL

composer require crhg/laravel-config-validator

USAGE

PREPARE RULES

Implement the Crhg\ConfigValidator\Interfaces\ConfigValidationRuleProvider interface in the service provider class., (*2)

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., (*3)

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., (*4)

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

It will display a message if there is a problem., (*5)

It exists with status 1 if some errors are found., (*6)

BUGS

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

The Versions

10/04 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

by Manabu Matsui

10/04 2018

v1.0.1

1.0.1.0

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

  Sources   Download

MIT

The Requires

 

by Manabu Matsui

10/04 2018

v1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

 

by Manabu Matsui