mercredi 13 septembre 2017

Laravel 5: How to get config value in artisan console command

I get config values in Laravel like this:

$value = config('app.name');

If I try the same in a method, which is called from an artisan command, then I get the following error message:

[ErrorException] Trying to get property of non-object

Is it possible to get config values from an artisan console command?

I have found a solution for Laravel 4, but there is no such method in Laravel 5.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire