@php
$tblStats = '<table class="table table-bordered"><tr class="bg-info text-black"><td class="font-weight-bold">Joining<br>Date</td><td class="font-weight-bold">Resign<br>Date</td></tr>';
$tblStats .= '<tr class="text-black">';
$avg = 0;
$joining_date= $derivers->joining_date;
$resign_date= $derivers->resign_date;
$tblStats .= '<td>' . date("F j, Y", strtotime($joining_date)) . '</td>';
$tblStats .= '<td>' .date("F j, Y", strtotime($resign_date)) . '</td>';
$avg = $derivers->calculate_job_days($joining_date, $resign_date);

$tblStats .= '</tr><tr><td colspan="3"></td></tr>';
$tblStats .= '<tr class="text-black">';
$tblStats .= '<td class="font-weight-bold">Working</td>';
$tblStats .= '<td colspan="1">' . $avg . '    </td>';
$tblStats .= '</tr><tr><td colspan="2"></td></tr>';
$tblStats .= '</table>';
@endphp
<span class="tooltip1 pull-right text-danger">
    <i class="fa fa-info-circle"></i>
    Avg.
    <span class="tooltiptext" style="margin-left: -130px;">{!! $tblStats !!}</span>
</span>
