PHP code example of scriptoshi / settings

1. Go to this page and download the library: Download scriptoshi/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/ */

    

scriptoshi / settings example snippets


use Scriptoshi\Settings\Facades\Setting;

$value = Setting::get('setting_name');

$value = Setting::get('setting_name', 'default_value');

$settings = Setting::all();

$groupedSettings = Setting::group();

$groupSettings = Setting::for('group_name');

Setting::set('setting_name', 'value');

Setting::set([
    'setting_1' => 'value1',
    'setting_2' => 'value2',
]);

Setting::refresh();
bash
php artisan vendor:publish --provider="Scriptoshi\Settings\SettingServiceProvider"