PHP code example of khophim8k / settings
1. Go to this page and download the library: Download khophim8k/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/ */
khophim8k / settings example snippets
diff
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
+ $this->overrideConfigValues();
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
+ protected function overrideConfigValues()
+ {
+ $config = [];
+ if (config('settings.skin'))
+ $config['backpack.base.skin'] = config('settings.skin');
+ if (config('settings.show_powered_by'))
+ $config['backpack.base.show_powered_by'] = config('settings.show_powered_by') == '1';
+ config($config);
+ }
}
routes/backpack/settings.php