Skip to content

Commit

Permalink
Added serialization parameters to helper functions decrypt and encrypt (
Browse files Browse the repository at this point in the history
  • Loading branch information
SDekkers authored and taylorotwell committed Aug 9, 2018
1 parent 81a8f99 commit b0baeff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,12 @@ function database_path($path = '')
* Decrypt the given value.
*
* @param string $value
* @param bool $unserialize
* @return mixed
*/
function decrypt($value)
function decrypt($value, $unserialize = true)
{
return app('encrypter')->decrypt($value);
return app('encrypter')->decrypt($value, $unserialize);
}
}

Expand Down Expand Up @@ -452,11 +453,12 @@ function elixir($file, $buildDirectory = 'build')
* Encrypt the given value.
*
* @param mixed $value
* @param bool $serialize
* @return string
*/
function encrypt($value)
function encrypt($value, $serialize = true)
{
return app('encrypter')->encrypt($value);
return app('encrypter')->encrypt($value, $serialize);
}
}

Expand Down

0 comments on commit b0baeff

Please sign in to comment.