Эх сурвалжийг харах

Support a default value in time_in_minsec() helper

Vijayakrishnan Krishnan 5 жил өмнө
parent
commit
53c686fd52

+ 2 - 2
app/Helpers/helpers.php

@@ -29,8 +29,8 @@ if(!function_exists('friendly_date_time')) {
 }
 
 if(!function_exists('time_in_minsec')) {
-    function time_in_minsec($value) {
-        if(!$value || empty($value)) return "-";
+    function time_in_minsec($value, $default = '0s') {
+        if(!$value || empty($value)) return $default;
         $value = intval($value);
         $minutes = intval($value / 60);
         $seconds = $value % 60;