@if (!is_null($upcomingAuctions)) @foreach ($upcomingAuctions as $item) @php // Assuming you have two dates $now = \Carbon\Carbon::parse(\Carbon\Carbon::now()); $startDate = \Carbon\Carbon::parse($item->start_date . $item->start_time); $difference = $startDate->diffInSeconds($now); // To get how many days are left from the time difference in seconds $days = floor($difference / 86400); // To get how many hours are left after days have been substracted $hours = floor(($difference % 86400) / 3600); //To calculate how many minutes are left $minutes = floor(($difference % 3600) / 60); @endphp