FEATURE: add getJson method to Settings helper

This commit is contained in:
Michal Kváček
2016-09-25 01:35:52 +02:00
parent 80105c857e
commit 85bbc384a7
+12
View File
@@ -45,6 +45,18 @@ class Settings
return $default;
}
/**
* Shortcut for obtaining settings saved as JSON
*
* @param $key
*
* @return mixed
*/
public static function getJson($key)
{
return json_decode(self::get($key, '{}'));
}
/**
* Get all settings
*