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(1y ago)01.7k↓50%MITPHPPHP &gt;=7.1.0|^8.0

Since Feb 13Pushed 1y 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 1mo 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

32

—

LowBetter than 72% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d231ce193e9b44a5b234820cb8350cd0bb9168b989ce6f257e4ce691e3ae56e0?d=identicon)[hrace009](/maintainers/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

[artesaos/seotools

SEO Tools for Laravel and Lumen

3.3k5.1M60](/packages/artesaos-seotools)[prologue/alerts

Prologue Alerts is a package that handles global site messages.

3486.1M30](/packages/prologue-alerts)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[spatie/laravel-googletagmanager

Google Tag Manager integration for Laravel

4413.4M5](/packages/spatie-laravel-googletagmanager)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

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