PHPackages                             vi-kon/laravel-db-config - 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. [Database &amp; ORM](/categories/database)
4. /
5. vi-kon/laravel-db-config

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

vi-kon/laravel-db-config
========================

Laravel 5 database configurator

v1.2.0(10y ago)68644[3 issues](https://github.com/vi-kon/laravel-db-config/issues)MITPHPPHP &gt;=5.5.9

Since Mar 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/vi-kon/laravel-db-config)[ Packagist](https://packagist.org/packages/vi-kon/laravel-db-config)[ Docs](https://github.com/vi-kon/laravel-db-config)[ RSS](/packages/vi-kon-laravel-db-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Laravel 5 database config
=========================

[](#laravel-5-database-config)

This is **Laravel 5** package for storing dynamic config in database.

**Table of content**

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

---

[Back to top](#laravel-5-database-config)

Features
--------

[](#features)

- Dynamic config stored in database
- Easily add new keys

---

[Back to top](#laravel-5-database-config)

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

[](#installation)

Via `composer` run following command in your project root:

```
composer require vi-kon/laravel-db-config
```

In your Laravel 5 project add following lines to `app.php`:

```
// to app.php's providers array
'ViKon\DbConfig\DbConfigServiceProvider',
```

To install database migration file simple call following commands:

```
php artisan vendor:publish --provider=ViKon\DbConfig\DbConfigServiceProvider

php artisan migrate
```

This will install `create_config_table` migration file to application `database/migrations` directory and create new `config` table in default database.

---

[Back to top](#laravel-5-database-config)

Usage
-----

[](#usage)

- [Getting values](#getting-values)
- [Setting values](#setting-values)
- [Organize config keys](#organize-config-keys)

### Getting values

[](#getting-values)

Getting data from database is simple:

```
$value = config_db('key');
```

Provide default value if key not exists in database

```
$value = config_db('key', 'default_value');
```

If no parameter provided to `config_db` function, then it returns `ViKon\DbConfig\DbConfig` instance.

```
// Get value by key
$value = config_db()->get('key');

// Get value by key with default value
$value = config_db()->get('key', 'default_value');
```

### Set values

[](#set-values)

Set values to database is easy simple call `config_db` function with no parameter and after it call `set` method.

```
config_db()->set('key', 'value');
```

\###Organize config keys

For better maintenance there is a support organizing config values to groups. To get or set config value to group simple use `{group}::{key}` schema as key.

```
// Gets 'db' group username value
$value = config_db('db::username');
```

---

[Back to top](#laravel-5-database-config)

License
-------

[](#license)

This package is licensed under the MIT License

---

[Back to top](#laravel-5-database-config)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

3

Last Release

3655d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.1.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/97ac6badd847093e56369390bf36ddbb8740e10a8a495b339c2adb78e7345663?d=identicon)[vincekovacs](/maintainers/vincekovacs)

---

Top Contributors

[![vincekovacs](https://avatars.githubusercontent.com/u/1031595?v=4)](https://github.com/vincekovacs "vincekovacs (35 commits)")

---

Tags

laravelconfigdatabase

### Embed Badge

![Health badge](/badges/vi-kon-laravel-db-config/health.svg)

```
[![Health](https://phpackages.com/badges/vi-kon-laravel-db-config/health.svg)](https://phpackages.com/packages/vi-kon-laravel-db-config)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)

PHPackages © 2026

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