PHP code example of visual-ideas / laravel-site-settings
1. Go to this page and download the library: Download visual-ideas/laravel-site-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/ */
visual-ideas / laravel-site-settings example snippets
return [
'cache_key' => env('LSS_CACHE_KEY','laravel_site_settings_data'),
// Set to true if you're using Filament (https://filamentphp.com/)
'filament' => false,
];
function settings($key = null, $default = null)
{
if (is_null($key)) {
return app('Settings')->all();
}
if (is_array($key)) {
return app('Settings')->set($key);
}
return app('Settings')->get($key, $default);
}