PHP code example of osaris-uk / app-settings

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

    

osaris-uk / app-settings example snippets


'providers' => [
    ...
    OsarisUk\AppSettings\AppSettingsServiceProvider::class,
]

setting('app_name')

setting('app_name', 'Pattern')

setting()->getAllCachedSettings()

setting()->getAllCachedSettings() // Returns collection of all cached settings
setting()->settingExists($key) // Returns true / false
setting()->getCachedValue($key) // Returns setting value
setting()->setCachedValue($key, $value) // Returns new setting value
setting()->remove($key) // Returns true / false  (Sets value to null & soft deletes the record)
setting()::clearCache() // Returns true / false