Skip to content

A free open source IT asset/license management system

Added comments, removed gthe AgeFormat() helper method

snipef4bd30742164
diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php
index 9c7ca068c3..3692c9c1f7 100644
--- a/app/Helpers/Helper.php
+++ b/app/Helpers/Helper.php
@@ -1130,32 +1130,20 @@ class Helper
return $bytes;
}
+
+ /**
+ * This is weird but used by the side nav to determine which URL to point the user to
+ *
+ * @author A. Gianotto <[email protected]>
+ * @since 5.0
+ *
+ * @return string[]
+ */
public static function SettingUrls(){
$settings=['#','fields.index', 'statuslabels.index', 'models.index', 'categories.index', 'manufacturers.index', 'suppliers.index', 'departments.index', 'locations.index', 'companies.index', 'depreciations.index'];
return $settings;
}
- public static function AgeFormat($date) {
- $year = Carbon::parse($date)
- ->diff(now())->y;
- $month = Carbon::parse($date)
- ->diff(now())->m;
- $days = Carbon::parse($date)
- ->diff(now())->d;
- $age='';
- if ($year) {
- $age .= $year.'y ';
- }
- if ($month) {
- $age .= $month.'m ';
- }
- if ($days) {
- $age .= $days.'d';
- }
-
- return $age;
-
- }
/**