PHPackages                             hrace009/config-writer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hrace009/config-writer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hrace009/config-writer
======================

Write to Laravel Config files and maintain file integrity

1.6(2y ago)01.8k↓81%MITPHPPHP &gt;=7.1.0|^8.0

Since Feb 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hrace009/config-writer)[ Packagist](https://packagist.org/packages/hrace009/config-writer)[ RSS](/packages/hrace009-config-writer/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Laravel Config Writer
=====================

[](#laravel-config-writer)

Write to Laravel Config files and maintain file integrity.

This library is an extension of the Config component used by Laravel. It adds the ability to write to configuration files.

You can rewrite array values inside a basic configuration file that returns a single array definition (like a Laravel config file) whilst maintaining the file integrity, leaving comments and advanced settings intact.

The following value types are supported for writing: strings, integers, booleans and single-dimension arrays.

Support
-------

[](#support)

This provider is designed to be used in Laravel from `5.4 - 11.0` version.

Setup
-----

[](#setup)

Install through composer:

```
composer require "hrace009/config-writer"

```

Add this to `app/config/app.php` under the 'providers' key:

```
hrace009\ConfigWriter\ServiceProvider::class,
```

Usage
-----

[](#usage)

You can write to config files like this:

```
Config::write('app.url', 'http://domain.com');

app('config')->write('app.url', 'http://domain.com');
```

### Outside Laravel

[](#outside-laravel)

The `Rewrite` class can be used anywhere.

```
$writeConfig = new hrace009\ConfigWriter\DataWriter\Rewrite;
$writeConfig->toFile('path/to/config.php', [
    'item' => 'new value',
    'nested.config.item' => 'value',
    'arrayItem' => ['Single', 'Level', 'Array', 'Values'],
    'numberItem' => 3,
    'booleanItem' => true
]);
```

Subcribe my YT Channel: [hrace009](https://youtube.com/hrace009)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

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 ~221 days

Total

5

Last Release

763d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7691118?v=4)[hrace009](/maintainers/hrace009)[@hrace009](https://github.com/hrace009)

---

Top Contributors

[![hrace009](https://avatars.githubusercontent.com/u/7691118?v=4)](https://github.com/hrace009 "hrace009 (13 commits)")

---

Tags

composerlaravellaravel-packagephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hrace009-config-writer/health.svg)

```
[![Health](https://phpackages.com/badges/hrace009-config-writer/health.svg)](https://phpackages.com/packages/hrace009-config-writer)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[artesaos/seotools

SEO Tools for Laravel and Lumen

3.4k5.6M65](/packages/artesaos-seotools)[cmgmyr/messenger

Simple user messaging tool for Laravel

2.6k2.6M6](/packages/cmgmyr-messenger)[propaganistas/laravel-disposable-email

Disposable email validator

6023.2M7](/packages/propaganistas-laravel-disposable-email)[glorand/laravel-model-settings

Model Settings for your Laravel app

9171.2M4](/packages/glorand-laravel-model-settings)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

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