PHPackages                             aurorawebsoftware/aconfig - 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. aurorawebsoftware/aconfig

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

aurorawebsoftware/aconfig
=========================

1.2.0(1y ago)0275MITPHP

Since Jan 23Pushed 1y agoCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Larvel Dynamic Config
=====================

[](#larvel-dynamic-config)

Introduction
------------

[](#introduction)

This Package makes it possible for users to have their config files stored in a database table, making it easier to customize these values from UI.

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

[](#installation)

You can install the package via composer:

```
composer require emadha/laravel-dynamic-config
```

The package will automatically register itself.

You can publish the config with:

Config file:

```
php artisan vendor:publish --provider="AuroraWebSoftware\AConfig\ServiceProvider" --tag="config"
```

Migration:

```
php artisan vendor:publish --provider="AuroraWebSoftware\AConfig\ServiceProvider" --tag="migrations"
```

Usage
-----

[](#usage)

First of all, you need to decide which config file(s) you want them to be stored in database by adding `'dynamic'=> true` to the file, as simple as that:

```
# /config/app.php
return [
    'dynamic' => true,
     ...
];
```

> - Note that `dynamic` indicator is defined in `/config/emadha/dynamic-conf.php`:
> - You can add `dynamic=>true` to any config file to store it in database and fetch the values from there instead of using the actual config file
> - The values defaults will be taken from the actual config file.
> - You can have more than one config file loaded dynamically
> - `dynamic=>true` can only be added in the first dimension of that config array.

The main config file of this packages is located in `/config/emadha/dynamic-conf.php` and contains the following code:

```
