use IlluminateSupportFacadesCrypt; $encrypted = Crypt::encryptString('Hello world.'); $decrypted = Crypt::decryptString($encrypted);