klaravel / settings by ajmerainfo

Laravel database settings manager.
5,725
4
0
Package Data
Maintainer Username: ajmerainfo
Maintainer Contact: ajmerainfo@gmail.com (Keyur Ajmera)
Package Create Date: 2016-10-10
Package Last Update: 2017-04-08
Language: PHP
License: MIT
Last Refreshed: 2021-06-21 15:21:05
Package Statistics
Total Downloads: 5,725
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 4
Total Watchers: 0
Total Forks: 0
Total Open Issues: 0

General Settings Manager for Laravel 5.3+

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

This module allow you to store settings into database with easy commands. You can store as many as settings and it will fetch settings with caching so only one database query and all settings will store into cache.

Installation:

  1. Run

    composer require klaravel/settings
    

    in console to install this module

  2. Open config/app.php and in providers section add:

    Klaravel\Settings\ServiceProvider::class,
    

    in aliases section add:

    'Setting' => Klaravel\Settings\SettingsFacade::class,
    
  3. Now generate the Settings migration:

    php artisan settings:migration
    
    // for migrate database
    php artisan migrate
    

    You will see migration file on you /database/migrations/ folder.

Usage:

Here's a quick example that shows how to use Setting:

Setting::put('key', 'value');   // Insert settings into database
Setting::set('key', 'value');   // Insert settings into database
Setting::get('key');            // Get settings from database
Setting::has('key');            // Check key exits in database
Setting::forget('key');         // Delete key and value from database