<commit_before># Database config loader for Laravel
This package provides simple database config storage and loading for Laravel, in the form of a single table to 
store key => value pairs.

## Installation
Require this package in your `composer.json` file:

~~~json
"jameswmcnab/config-db": "dev-master"
~~~

And add the ServiceProvider to the `providers` array in `app/config/app.php` file:

~~~php
'Jameswmcnab\ConfigDb\ConfigDbServiceProvider',
~~~

Run the package migrations to create the config table:

~~~bash
php artisan migrate --package="jameswmcnab/config-db"
~~~

Publish the package config using Artisan (If you want to change the default config table name to something other than `config`).

~~~bash
php artisan config:publish jameswmcnab/config-db
~~~

## Usage

### Save configuration by key:

~~~php
ConfigDb::save('foo', bar);
~~~

### Get configuration by key:

~~~php
ConfigDb::get('foo'); // bar
~~~<commit_msg>Updated README for Laravel 5 usage, was showing Laravel 4 style.<commit_after># Database config loader for Laravel
This package provides simple database config storage and loading for Laravel, in the form of a single table to 
store key => value pairs.

## Installation
First, require this package with composer:

```bash
composer require jameswmcnab/db-config
````

And add the ServiceProvider to the `providers` array in `app/config/app.php` file:

```php
'Jameswmcnab\ConfigDb\ConfigDbServiceProvider',
```

Publish the package migrations and run to create the config table:

```bash
php artisan vendor:publish --tag=migrations
php artisan migrate
```

Publish the package config using Artisan (If you want to change the default config table name to something other than `config`).

```bash
php artisan vendor:publish --tag=config
```

Then edit `config/config-db.php` in your main application directory.

## Usage

### Save configuration by key:

```php
ConfigDb::save('foo', bar);
```

### Get configuration by key:

```php
ConfigDb::get('foo'); // bar
```
{'fraction_non_alphanumeric': 0.11384152457372117, 'fraction_numerical': 0.0010030090270812437, 'mean_word_length': 5.045454545454546, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3645429', 'n_tokens_mistral': 605, 'n_tokens_neox': 570, 'n_words': 239}