Putting variables in settings.php in Drupal 8

Submitted bybarnettech onMon, 08/30/2021 - 09:27

In your settings.php:

$settings['foo'] = 'bar';

In your code:

use Drupal\Core\Site\Settings;

Settings::get('foo', 'mydefaultvalue');