summaryrefslogtreecommitdiff
path: root/app/Libraries/Helper.php
diff options
context:
space:
mode:
authorhorus2020-04-02 21:52:04 +0200
committerhorus2020-04-02 21:52:04 +0200
commit5a8c47e29afdbb61c32c1e03162abb1bb871ee9e (patch)
tree19cd2e0c48119a703306a71df813d07666289e8f /app/Libraries/Helper.php
downloadcurious-5a8c47e29afdbb61c32c1e03162abb1bb871ee9e.tar.gz
Initial commit.
Diffstat (limited to 'app/Libraries/Helper.php')
-rw-r--r--app/Libraries/Helper.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Libraries/Helper.php b/app/Libraries/Helper.php
new file mode 100644
index 0000000..b0ecdfd
--- /dev/null
+++ b/app/Libraries/Helper.php
@@ -0,0 +1,16 @@
+<?php
+namespace App\Libraries;
+use App\Libraries\Helper;
+use Carbon\Carbon;
+
+class Helper {
+ public static function escapeLike($string){
+ $search = array('%', '_');
+ $replace = array('\%', '\_');
+ return str_replace($search, $replace, $string);
+ }
+
+ public static function formatTimestamp($timestamp) {
+ return Carbon::createFromTimestamp($timestamp)->format("Y-m-d");
+ }
+}