Support the ongoing development of Laravel.io →
posted 4 years ago
Laravel

i have a facade (ITwrxCrypt) that references my service provider (ITwrxCryptServiceProvider) which extends \Illuminate\Encryption\EncryptionServiceProvider and returns an instance (terminology?) of Illuminate\Encryption\Encrypter. This allows me to use ITwrxCrypt::decrypt(), with decrypt() being a function in Laravel's Encrypter class. This works fine everywhere in my app except in artisan/console commands. When i try to access decrypt() from the handle method of a command using the ITwrxCrypt::decrypt() it fails. It "sees" any functions in my facade, but not the service provider it references with getFacadeAccessor(), the service provider my service provider extends, nor the Encrypter class my service provider returns: where the decrypt() function is.

What would break the link between the facade and the service provider only in commands?

L5.5

thanks

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

ITwrx itwrx Joined 24 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.