@php $notifys = auth()->guard('customer')->user()->unreadNotifications()->paginate(2); $badgecount = auth()->guard('customer')->user()->unreadNotifications->count(); @endphp @forelse( $notifys as $notification) @php if(isset($notification->data['clink'])){ $explodeurl = explode('ticket/view/', $notification->data['clink']); $stringreplaceurl = str_replace($explodeurl[1], encrypt(urldecode($explodeurl[1])) , $notification->data['clink']); }else{ $stringreplaceurl = ''; } @endphp @if (array_key_exists('reasonofinfo', $notification->data) && $notification->data['reasonofinfo'] == 'adminreset2fa')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your two factor authentication details are removed by admin.', 'notification')}}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@else @if($notification->data['status'] == 'New') @if(isset($notification->data['replystatus']) && $notification->data['replystatus'] == 'Bot-Replied')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('You got a new reply on this ticket', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@else
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your new ticket has been created', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @endif @if($notification->data['status'] == 'Closed')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your ticket has been closed', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'On-Hold')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your ticket status is On-Hold', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'Re-Open')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your ticket has been Reopened', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'Inprogress')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('You got a new reply on this ticket', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'overdue')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your ticket status is Overdue', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'Suspend')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your ticket status is Suspend', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if ($notification->data['status'] == 'mail')
{{Str::limit($notification->data['mailsubject'], '30')}}

{{strip_tags(Str::limit($notification->data['mailtext'], '35'))}}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if ($notification->data['status'] == 'invoice') @php $id = decrypt($notification->data['invoice_id']); $invoiceExists = \App\Models\AllTransactions::where('invoiceId', $id)->exists(); @endphp @if($notification->data['itemStatus'] == 'pending') @if($invoiceExists) @endif
{{ lang('New custom invoice created.') }}

{{ Str::limit(lang('A new custom invoice is created', 'notification'), '30' , '...') }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@if($invoiceExists)
@endif @endif @if($notification->data['itemStatus'] == 'refundRejected')
{{ lang('Your refund request rejected.') }}

{{ Str::limit(lang('Your refund request is rejected.', 'notification'), '30' , '...') }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['itemStatus'] == 'refunded')
{{ lang('Your refund request approved.') }}

{{ Str::limit(lang('Your refund request is approved.', 'notification'), '30' , '...') }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @endif @endif @empty

{{lang('There are no new notifications to display', 'notification')}}

@endforelse