vendredi 20 mai 2016

Laravel application bootstrap setting options

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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/20fIZPw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire