All Projects → UniSharp → Laravel Settings

UniSharp / Laravel Settings

Licence: mit
Persistent key-value storage for Laravel, json value supported. l10n supported.

Projects that are alternatives of or similar to Laravel Settings

Laravel Options
Global key-value store in the database
Stars: ✭ 626 (+519.8%)
Mutual labels:  key-value, laravel
Laravel Setting
Persistent settings package for Laravel
Stars: ✭ 278 (+175.25%)
Mutual labels:  config, laravel
Config
Manage Laravel configuration by persistent storage
Stars: ✭ 139 (+37.62%)
Mutual labels:  config, laravel
Config
Config manager for laravel-admin
Stars: ✭ 83 (-17.82%)
Mutual labels:  config, laravel
Elasticsearch Eloquent
⚡️ Eloquent models for Elasticsearch.
Stars: ✭ 100 (-0.99%)
Mutual labels:  laravel
Laravel Permission
Associate users with roles and permissions
Stars: ✭ 10,024 (+9824.75%)
Mutual labels:  laravel
Addchat Laravel
AddChat Laravel is a Laravel chat package. Live chat widget for Laravel that also includes multi-user chat, group permissions, customer support chat & more.
Stars: ✭ 99 (-1.98%)
Mutual labels:  laravel
Sentinel
A framework agnostic authentication & authorization system.
Stars: ✭ 1,354 (+1240.59%)
Mutual labels:  laravel
Socialnetwork
Laravel and Vue.JS powerd social network
Stars: ✭ 101 (+0%)
Mutual labels:  laravel
Laravel Table
Generate tables from Eloquent models.
Stars: ✭ 101 (+0%)
Mutual labels:  laravel
Laradoo
Odoo ERP API for Laravel
Stars: ✭ 100 (-0.99%)
Mutual labels:  laravel
Zookeeper
Apache ZooKeeper
Stars: ✭ 10,061 (+9861.39%)
Mutual labels:  key-value
Laravel Storage
A simple filesystem abstraction package for Laravel 4.
Stars: ✭ 100 (-0.99%)
Mutual labels:  laravel
Laravel Seo Tools
Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard
Stars: ✭ 99 (-1.98%)
Mutual labels:  laravel
Asset Cdn
Serve Laravel Assets from a Content Delivery Network (CDN)
Stars: ✭ 101 (+0%)
Mutual labels:  laravel
Config Chain
Handle configuration once and for all
Stars: ✭ 98 (-2.97%)
Mutual labels:  config
Ecommerce Laravel Bootstrap
Responsive, Multi-Vendor, MultiLanguage Online Store Platform (shopping cart solution)
Stars: ✭ 99 (-1.98%)
Mutual labels:  laravel
.personal Emacs.d
😈 My opinionated Emacs configuration
Stars: ✭ 101 (+0%)
Mutual labels:  config
Succ
Sexy and Utilitarian Code Configuration
Stars: ✭ 100 (-0.99%)
Mutual labels:  config
Dots
A Repository For Config Files / Dotfiles / Themes / Color Schemes / Etc...
Stars: ✭ 100 (-0.99%)
Mutual labels:  config

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Persistent Settings Manager for Laravel

  • Simple key-value storage
  • Support multi-level array (dot delimited keys) structure.
  • Localization supported.

Installation

  1. Install package

    composer require unisharp/laravel-settings
    
  2. Edit config/app.php (Skip this step if you are using laravel 5.5+)

    service provider:

    Unisharp\Setting\SettingServiceProvider::class,
    

    class aliases:

    'Setting' => Unisharp\Setting\SettingFacade::class,
    
  3. Create settings table

    php artisan vendor:publish --tag=settings
    php artisan migrate
    

Usage

Setting::get('name', 'Computer');
// get setting value with key 'name'
// return 'Computer' if the key does not exists

Setting::all();
// get all settings

Setting::lang('zh-TW')->get('name', 'Computer');
// get setting value with key and language

Setting::set('name', 'Computer');
// set setting value by key

Setting::lang('zh-TW')->set('name', 'Computer');
// set setting value by key and language

Setting::has('name');
// check the key exists, return boolean

Setting::lang('zh-TW')->has('name');
// check the key exists by language, return boolean

Setting::forget('name');
// delete the setting by key

Setting::lang('zh-TW')->forget('name');
// delete the setting by key and language

Dealing with array

Setting::get('item');
// return null;

Setting::set('item', ['USB' => '8G', 'RAM' => '4G']);
Setting::get('item');
// return array(
//     'USB' => '8G',
//     'RAM' => '4G',
// );

Setting::get('item.USB');
// return '8G';

Dealing with locale

By default language parameter are being resets every set or get calls. You could disable that and set your own long term language parameter forever using any route service provider or other method.

Setting::lang(App::getLocale())->langResetting(false);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].