getName()); if (is_array($routeName) && !empty($routeName[0])) { if (!in_array($routeName[0], $ignoreRoutes)) { $routeNameArr[$routeName[0]][] = $value->getName(); } } } } return $routeNameArr; } function generateEstimateNumber() { $lastEstimate = Estimate::withTrashed()->latest()->first(); if ($lastEstimate) { $newEstimateNumber = intval($lastEstimate->estimate_no) + 1; return $newEstimateNumber; } else { return 1; } }