2017 © Pedro Peláez
 

library dsettings

Store custom settings in database and add cache layer for performance

image

codepeak/dsettings

Store custom settings in database and add cache layer for performance

  • Friday, April 24, 2015
  • by codepeak
  • Repository
  • 1 Watchers
  • 2 Stars
  • 211 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DSetting (Laravel4 Package)

Build Status, (*1)

Store and handle custom settings in the database. Will use the Laravel cache system to minimize database queries., (*2)

Quick start

Required setup

In the require key of composer.json file add the following, (*3)

"codepeak/dsettings": "dev-master"

Run the Composer update comand, (*4)

$ composer update

In your config/app.php add 'Codepeak\Dsettings\DsettingsServiceProvider' to the end of the $providers array, (*5)

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Codepeak\Dsettings\DsettingsServiceProvider',

),

At the end of config/app.php add 'DSetting' => 'Codepeak\Dsettings\Facades\DSetting' to the $aliases array, (*6)

'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    ...
    'DSetting'    => 'Codepeak\Dsettings\Facades\DSetting',

),

Run the migration update command to create the settings table, (*7)

$ php artisan migrate --package=codepeak/dsettings

Usage

Get value from the database (or cache if fetched earlier), (*8)

\DSetting::get('database.key');

Store or update value, (*9)

\DSetting::set('database.key', 'my nice value');

The Versions

24/04 2015

dev-master

9999999-dev

Store custom settings in database and add cache layer for performance

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robert Lord

database laravel cache illuminate