PHPackages                             hungnm1518/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. hungnm1518/config-writer

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

hungnm1518/config-writer
========================

Save changes to the configuration file in script.

1.1.1(2y ago)021MITPHP

Since Dec 11Pushed 2y agoCompare

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

READMEChangelog (2)Dependencies (1)Versions (10)Used By (0)

config-writer
=============

[](#config-writer)

Save changes to the configuration file in script.

Installing
----------

[](#installing)

Install using Composer `composer require hungnm1518/config-writer`.

Using it's facade
-----------------

[](#using-its-facade)

You can use our facade `HungNM\ConfigWriter\Facade` to ad the `write`-method to the default `Config`-facade.

To do this you must open your config file `config/app.php` and replace `'Config' => 'Illuminate\Support\Facades\Config::class',` under `providers`-section with our facade `HungNM\ConfigWriter\Facade::class`. Then it will look like `'Config' => 'HungNM\ConfigWriter\Facade::class',`.

Once this is done you can use `Config::write($configFile, $changes)`, example changing your application url can be done by `Config::write('app', ['url' => 'http://your-site.com'])`.

Using the repository
--------------------

[](#using-the-repository)

You can also use the repository `HungNM\ConfigWriter\Repository` which works a little like a model.

Example:

```
$config = new HungNM\ConfigWriter\Repository('app'); // loading the config from config/app.php

$config->set('debug', false); // set the config you wish

if ($config->get('url') == 'http://localhost') // you can even get config from this
{
	$config->set('debug', true);
}

$config->save(); // save those settings to the config file once done editing

```

If you do this a lot I recommend adding the alias `'ConfigWriter' => HungNM\ConfigWriter\Repository::class` under the `alias`-section in the config file `config/app.php`.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 69.2% 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 ~764 days

Total

5

Last Release

801d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1074467?v=4)[Hưng Nguyễn](/maintainers/hungnm144)[@hungnm144](https://github.com/hungnm144)

---

Top Contributors

[![marktopper](https://avatars.githubusercontent.com/u/2232539?v=4)](https://github.com/marktopper "marktopper (18 commits)")[![SignpostMarv](https://avatars.githubusercontent.com/u/304403?v=4)](https://github.com/SignpostMarv "SignpostMarv (6 commits)")[![hungnm1518](https://avatars.githubusercontent.com/u/43890051?v=4)](https://github.com/hungnm1518 "hungnm1518 (2 commits)")

---

Tags

laravelconfigpackagewritersave

### Embed Badge

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

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

###  Alternatives

[akaunting/laravel-setting

Persistent settings package for Laravel

490883.0k7](/packages/akaunting-laravel-setting)[evilfreelancer/openvpn-php

OpenVPN config generator writen on PHP

315.0k](/packages/evilfreelancer-openvpn-php)[creasi/laravel-nusa

A Laravel package that aim to provide Indonesia' Administrative Data

997.9k3](/packages/creasi-laravel-nusa)[wujunze/money-wrapper

MoneyPHP Wrapper

103.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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