2
I need to use the "Crypt" component but separate without using the framework, I installed it via Composer.
https://github.com/illuminate/encryption
include 'vendor/autoload.php';
use Illuminate\Encryption;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Contracts\Encryption\DecryptException;
$encrypted = Crypt::encryptString('Hello world.');
$decrypted = Crypt::decryptString($encrypted);
He makes a mistake
Fatal error: Uncaught Exception 'Runtimeexception' with message 'A facade root has not been set. ' in /var/www/html/exec/crypt/vendor/Illuminate/support/Facades/Facade.php:218 Stack trace: #0 /var/www/html/exec/crypt/index.php(14): Illuminate Support Facades Facade::__callStatic('encryptString', Array) #1 /var/www/html/exec/crypt/index.php(14): Illuminate Support Facades Crypt::encryptString('Hello world.') #2 {main} thrown in /var/www/html/exec/crypt/vendor/Illuminate/support/Facades/Facade.php on line 218
Did the answer help you understand? or do you need to explain something?
– novic
Is giving this Fatal error error: Class 'Illuminate Encryption Encrypter'
– TutiJapa Wada
Take a look now at the editing if you’ve segmented the installation steps! and the editing
– novic