1. Go to this page and download the library: Download dalholm/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/ */
dalholm / laravel-settings example snippets
/*
* You can place your custom package configuration in here.
*/
return [
/*
|--------------------------------------------------------------------------
| Cache
|--------------------------------------------------------------------------
| Cache is only working with redis and uses cache tags
|
*/
'cache' => [
'enabled' => env('SETTINGS_CACHE_ENABLED', false),
'profile' => Dalholm\LaravelSettings\Cache\CacheProfile::class,
'store' => null,
],
/*
|--------------------------------------------------------------------------
| Database settings
|--------------------------------------------------------------------------
| You could use what ever you want
|
*/
'database' => [
'connection' => null,
'table' => 'settings',
'key' => 'key',
'value' => 'value',
],
/*
|--------------------------------------------------------------------------
| Fallback
|--------------------------------------------------------------------------
| Use this as a fallback if settings is not yet available in database
|
| Example:
| "power" => "is-on"
|
*/
'fallback' => [
//
],
];