@extends('admin.layout') @section('content')
Ticket Details - #{{$ticket->ticket_number}}

{{$ticket->subject}}

@if($ticket->status != 'close') @endif
@if($ticket->status == 'pending') Pending @elseif($ticket->status == 'open') Open @else Closed @endif {{$ticket->created_at->format('d-m-Y')}} {{date("h.i A", strtotime($ticket->created_at))}}

{!! replaceBaseUrl($ticket->message) !!}

@if($ticket->zip_file) Download Attachment @endif
Replies
@if(count($ticket->messages) > 0) @foreach ($ticket->messages as $reply) @if(!$reply->user_id) @php $admin = App\Admin::find($ticket->admin_id); @endphp
...
{{$admin->username}}
{{$admin->id == 1 ? 'Super Admin' : $admin->role->name}}

{!! replaceBaseUrl($reply->reply) !!}

@if($reply->file) Download @endif
@else @php $user = App\User::findOrFail($ticket->user_id); @endphp
@if (strpos($user->photo, 'facebook') !== false || strpos($user->photo, 'google')) user-photo @else user-photo @endif
{{$user->username}}
{{__('Customer')}}

{!! replaceBaseUrl($reply->reply) !!}

@if($reply->file) Download @endif
@endif @endforeach @endif
@if($ticket->status != 'close')
Reply to Ticket
@csrf

Upload only ZIP Files, Max File Size is 5 MB

@endif
@endsection @section('scripts') @endsection