1. Go to this page and download the library: Download umobi/laravel-settings library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
umobi / laravel-settings example snippets
Umobi\Setting\SettingServiceProvider::class,
'Setting' => Umobi\Setting\SettingFacade::class,
Setting::get('name', 'Computer');
// get setting value with key 'name'
// return 'Computer' if the key does not exists
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