PHP code example of backpack / settings
1. Go to this page and download the library: Download backpack/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/ */
backpack / 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.show_powered_by')) {
+ $config['backpack.ui.show_powered_by'] = config('settings.show_powered_by') == '1';
+ }
+ config($config);
+ }
}
routes/backpack/settings.php