Selaa lähdekoodia

Support a default value in time_in_minsec() helper

Vijayakrishnan Krishnan 5 vuotta sitten
vanhempi
commit
53c686fd52
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      app/Helpers/helpers.php

+ 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;