I am developing a Laravel app using a third party library for various helper function.
The way this library acts depends on the environment (dev, test, prod).
I want to set the library's debug setting based on the value of the Laravel .env
setting, and I assumed that the best place to set this would be in the bootstrap/app.php
file. So I was trying something like this right before $app
is returned:
MyCustomLibrary::set_debug(config('app.debug'));
return $app;
This throws the error ReflectionException: Class config does not exist
.
Where would I set this if not in the bootstrap/app.php
? Is there a different syntax I'd use?