PHPackages                             crhg/laravel-config-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. crhg/laravel-config-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

crhg/laravel-config-validator
=============================

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

v1.0.1(8y ago)027MITPHPPHP &gt;=7.0

Since Apr 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/crhg/laravel-config-validator)[ Packagist](https://packagist.org/packages/crhg/laravel-config-validator)[ RSS](/packages/crhg-laravel-config-validator/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (3)Used By (0)

DESCRIPTION
===========

[](#description)

Validate the configuration of the Laravel application.

INSTALL
=======

[](#install)

```
composer require crhg/laravel-config-validator
```

USAGE
=====

[](#usage)

PREPARE RULES
-------------

[](#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](https://laravel.com/docs/master/validation).

### EXAMPLE

[](#example)

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

PERFORM CHECK
-------------

[](#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
====

[](#bugs)

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

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3003d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd1a173eef0d98c0451f8e692aeb623360da4c533d1d15e9d0f6edf5aa4fe12a?d=identicon)[crhg](/maintainers/crhg)

---

Top Contributors

[![crhg](https://avatars.githubusercontent.com/u/8174597?v=4)](https://github.com/crhg "crhg (6 commits)")

### Embed Badge

![Health badge](/badges/crhg-laravel-config-validator/health.svg)

```
[![Health](https://phpackages.com/badges/crhg-laravel-config-validator/health.svg)](https://phpackages.com/packages/crhg-laravel-config-validator)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.7k](/packages/larastan-larastan)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77018.2M122](/packages/laravel-mcp)[illuminate/queue

The Illuminate Queue package.

20432.2M1.5k](/packages/illuminate-queue)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
