PHP code example of farzai / app-settings
1. Go to this page and download the library: Download farzai/app-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/ */
farzai / app-settings example snippets
use Farzai\AppSettings\Setting;
use Farzai\AppSettings\Storage\FileStorage;
$setting = new Setting();
// Set a value
$setting->set('key', 'value');
// Get a value
$setting->get('key'); // value
// YourCustomStorageDriver implement \Farzai\AppSettings\Contracts\StorageRepositoryInterface::class
$setting = new Setting(new YourCustomStorageDriver());
// Or
$setting->setStorage(new YourCustomStorageDriver());