summaryrefslogtreecommitdiff
path: root/app/Libraries/Helper.php
blob: b0ecdfd626981c8f994e0062d3ae43f9bf9492a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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");
	}
}