Browse Source

Support a default value in time_in_minsec() helper

Vijayakrishnan Krishnan 5 years ago
parent
commit
53c686fd52
1 changed files with 2 additions and 2 deletions
  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')) {
 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);
         $value = intval($value);
         $minutes = intval($value / 60);
         $minutes = intval($value / 60);
         $seconds = $value % 60;
         $seconds = $value % 60;