Back To Previous Boss History:

@php $totalDuration = 0; @endphp @foreach($configValue->backtrack_logs as $indexValue => $backTrackHistory) @php $existsLogData = $configValue->backtrack_all_logs->where('effect_boss_step_no', $backTrackHistory['action_by_boss_step_no']) ->where('backtrack_sequence', '<', $backTrackHistory['backtrack_sequence']) ->sortByDesc('backtrack_sequence') ->first(); if($existsLogData != null) { $dateFrom = date('d-m-Y', strtotime($existsLogData['backtrack_date'])); $dateTo = date('d-m-Y', strtotime($backTrackHistory['backtrack_date'])); } else { $dateFrom = date('d-m-Y', strtotime($backTrackHistory['effect_boss_last_submission_date'])); $dateTo = date('d-m-Y', strtotime($backTrackHistory['backtrack_date'])); } $duration = 0; $parsingInitialDate = \Carbon\Carbon::parse($dateFrom); $parsingSubmitedDate = \Carbon\Carbon::parse($dateTo); $calculatedDate = $parsingSubmitedDate->format('d-m-Y'); if($parsingInitialDate->format('Y-m-d') != $parsingSubmitedDate->format('Y-m-d')) { // $duration = $parsingInitialDate->diffInDays($parsingSubmitedDate->addDay()); $duration = $parsingInitialDate->diffInDays($parsingSubmitedDate); } $totalDuration += $duration; @endphp @endforeach @php $configValue->backtrack_total_days = $totalDuration; @endphp
Attempt No. Back To Boss (Step No.) Date Of File Get Effect Date Of Back Track Day Count
{{ $backTrackHistory['backtrack_sequence'] }} {{ $backTrackHistory['effect_boss_step_no'] }} {{ $dateFrom }} {{ $dateTo }} {{ $duration }}
Total Day Count {{ $totalDuration }}