Show your code please :D
Using the Crypt facade in the config files.
I'm working on an artisan command for appending encrypted values to the .env file. This works fine for any variable I can process in the app before using it (app keys, oauth tokens, etc...) because I can decrypt the values.
However when I try to use the Crypt facade in the config file I get an error. For example if I try to wrap my database connection variables in a call to Crypt::decrypt() call I get a fatal error. The message back is that the instance is null.
My guess is that the application object isn't ready, but I'm not sure. Any advice?
Hopefully if I can get this working I can tidy up the code of the artisan command and release it as a package.
I'm not sure about this, but have you tried to use the full namespace to the facade or to the real class?
// Facade
Illuminate\Support\Facades\Crypt::decrypt($value);
// Class
new Illuminate\Encryption\Encrypter()->decrypt($value):
Please or to participate in this conversation.