@extends('layouts.app') @section('title') Mailbox @endsection @section('content') @php $user_role = Auth::user()->user_role; @endphp

Mailbox

Inbox

@if(isset($error))
{{ $error }}
@endif @if(isset($message) && !empty($message))
{{ $message }}
@endif
@if(isset($totalPages) && $totalPages > 0) {{ (($currentPage - 1) * $perPage) + 1 }}-{{ min($currentPage * $perPage, $inboxCount) }}/{{ $inboxCount }} @else 0/0 @endif
@php $prevPage = max(1, ($currentPage ?? 1) - 1); $nextPage = min(($totalPages ?? 1), ($currentPage ?? 1) + 1); $paginationParams = []; if (isset($searchTerm) && !empty($searchTerm)) { $paginationParams['search'] = $searchTerm; } @endphp = ($totalPages ?? 1)) onclick="return false;" @endif>
@foreach($mailData as $mail) @endforeach
{{ $mail['from'] }} {{ $mail['subject'] }} - {{ \Illuminate\Support\Str::limit($mail['body'], 50) }} @if($mail['has_attachment']) @endif {{ \Carbon\Carbon::parse($mail['date'])->diffForHumans() }}
@endsection