diff options
Diffstat (limited to 'app/Libraries')
| -rw-r--r-- | app/Libraries/TemplateFunction.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Libraries/TemplateFunction.php b/app/Libraries/TemplateFunction.php index 54a36de..c84b127 100644 --- a/app/Libraries/TemplateFunction.php +++ b/app/Libraries/TemplateFunction.php @@ -20,4 +20,16 @@ class TemplateFunction { public static function T($timestamp) { return gmdate("d.m.Y.", $timestamp); } + + public static function Camo($url) { + if ( "" != env("GOCAMO_HMAC") && "" != env("GOCAMO_URL") ) { + $phpamo = new \WillWashburn\Phpamo\Phpamo( + env("GOCAMO_HMAC"), + env("GOCAMO_URL") + ); + return $phpamo->camo($url); + } + + return $url; + } } |
