# Searched for Laravel 5.8 # Check https://laravel.com/docs/5.8/encryption for different Laravel versions. use IlluminateSupportFacadesCrypt; $encrypted = Crypt::encryptString('Hello world.'); $decrypted = Crypt::decryptString($encrypted);