$string = substr($stringCut, 0, strrpos($stringCut, ' ')) . ' ...';
}
$TicketData = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
$TicketDatarow = App\Model\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if ($LastResponse->role == "user") {
    $rep = "#F39C12";
    $username = $LastResponse->user_name;
} else {
    $rep = "#000";
    $username = $LastResponse->first_name . " " . $LastResponse->last_name;
    if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
        $username = $LastResponse->user_name;
    }
}
$titles = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
$count = count($titles);
foreach ($titles as $title) {
    $title = $title;
}
?>
                        <td class="mailbox-name"><a href="{!! URL('myticket',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}}   </a> ({!! $count!!}) <i class="fa fa-comment"></i></td>
                        <td class="mailbox-Id">#{!! $ticket->ticket_number !!}</td>
                        <?php 
$priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();
?>
                        <td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
                        
                <td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
                <td class="mailbox-last-activity">{!! $title->updated_at !!}</td>
                <td class="mailbox-date"></td>
                            </div>
                        </div>
                    </form>
                </div> -->
            </div>
        </div>
        <!-- ticket  conversations -->
        <!-- row -->
        <div class="row" >
            <div id="refresh1">
                <div class="col-md-12" >
                    <!-- The time line -->
                    <ul class="timeline">
                        <!-- timeline time label -->
                        <?php 
$conversations = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->paginate(10);
foreach ($conversations as $conversation) {
    ?>
                            <li class="time-label">
                                <?php 
    $ConvDate1 = $conversation->created_at;
    $ConvDate = explode(' ', $ConvDate1);
    $date = $ConvDate[0];
    $time = $ConvDate[1];
    $time = substr($time, 0, -3);
    if (isset($data) && $date == $data) {
    } else {
        ?>
 <span class="bg-green">
                                        {{date_format($conversation->created_at, 'd/m/Y')}}
                                    </span> <?php