You can use the same system as in other parts of Flarum
// In the imports:
use Flarum\Settings\SettingsRepositoryInterface;
// In the code:
$settings = app(SettingsRepositoryInterface::class);
$settings->get('acme-hello-world', '');
You should be adding this code inside an extender or listener and not at the root of extend.php
, as Flarum is not fully booted while extend.php
is parsed.