PHP code example of byancode / settings

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

    

byancode / settings example snippets


Byancode\Settings\Provider::class,

'Setting' => Byancode\Settings\Facade::class,

# GETTER  
Settings::get('foo');    
Settings::get('foo.bar'); 
Settings::get('foo__bar');

# SETTER  
Settings::set('foo', ['bar' => 'test']);
Settings::set('foo.bar', 'test');

$settings = settings();

# GETTER 
settings('foo');
$settings->foo;
settings('foo.bar');
$settings->foo__bar;
$settings->get('foo.bar');

# SETTER  
settings('foo', ['bar' => 'test']);
$settings->foo = ['bar' => 'test'];
$settings->foo__bar = 'test';
$settings->set('foo.bar', 'test');
bash
php artisan vendor:publish --provider="Byancode\Settings\Provider"