Skip to content
Advertisement

Slim 3: how to access settings?

Before the Slim 3 is released, codes below work fine:

settings.php,

JavaScript

index.php

JavaScript

MyClass.php

JavaScript

But after the release, I get this error below:

Notice: Undefined property: SlimApp::$settings in /…

So I can’t use $app->settings anymore? What should I use then?

Advertisement

Answer

You can get settings like this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement