PHPackages                             tjbp/saveconfig - 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. tjbp/saveconfig

AbandonedArchivedLibrary

tjbp/saveconfig
===============

Extends Laravel's Config component with save functionality.

5582PHP

Since Sep 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/tjbp/saveconfig)[ Packagist](https://packagist.org/packages/tjbp/saveconfig)[ RSS](/packages/tjbp-saveconfig/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SaveConfig
==========

[](#saveconfig)

Extends Laravel's Config component with save functionality. This can allow your users to configure the application via the application.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Known Issues](#known-issues)
- [Licence](#license)

Installation
------------

[](#installation)

Add the following to the require section of your `composer.json` file:

```
"tjbp/saveconfig": "dev"

```

After which run `composer update` to get the latest version of the package.

To register the included service provider with your application:

Open `app/config/app.php` and find the `providers` key. Add `SaveConfigServiceProvider` to the array.

Usage
-----

[](#usage)

This extension adds a save() method to the Config class, which will save a Laravel-compatible copy of the current environment's config to your environment directory, normally found within app/config.

```
// Set a configuration value at run-time as normal
Config::set('debug', true);

// Save all configuration values, including those set at run-time, to the current environment
Config::save();
```

Remember to be particularly vigilant in validating the configuration values, as well as preventing any assignment of keys that shouldn't be configurable.

It is recommended that your app's detectEnvironment() callback (found in bootstrap/start.php) return a default value other than "production", as that environment's configuration files are normally tracked and relied on for defaults, which could make application upgrades troublesome. Since this extension is most useful when used in combination with a white-label application, a good choice for a default environment would be the application's name (eg. "wordpress"). You can then ignore app/config/wordpress/\* with your flavour of version control software, while adopting values inside app/config/\* as defaults.

When working within a development environment, be sure to commit any changes to your configuraton before calling Config::save(), or the changes could be overwritten.

Known Issues
------------

[](#known-issues)

- Constants used as configuration values will be saved as their value, rather than their symbolic name, possibly causing version portability issues.
- Inherited values from the "production" environment will be included in a save.
- Saved configurations are valid PHP, but not formatted prettily or consistently with Laravel's default configuration.

Licence
-------

[](#licence)

This software is licensed under the GPLv3, see the `LICENSE` file for more details.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![tjbp](https://avatars.githubusercontent.com/u/2157634?v=4)](https://github.com/tjbp "tjbp (11 commits)")

### Embed Badge

![Health badge](/badges/tjbp-saveconfig/health.svg)

```
[![Health](https://phpackages.com/badges/tjbp-saveconfig/health.svg)](https://phpackages.com/packages/tjbp-saveconfig)
```

PHPackages © 2026

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