@if($auth_data['is_admin'] || $auth_data['is_super_admin']) {{ ucfirst($job->user->company_name) }} - {{ $job->internal_id }} - {{ $job->part }} - {{ @$total }} @if ($jobView) @else @endif {{ ucfirst($job->name) }} @endif @if($auth_data['is_customer']) {{ $job->internal_id }} - @if($job->submitted) @else @endif {{ $job->name }} @endif @if($job->media->count()) @endif @php $total = $job->comments->count(); $count = 0; foreach ($job->comments as $comment){ $count += $comment->readers->where('id', Auth::user()->id)->count(); } $unread = $total-$count; @endphp @if($unread) {{ $total }} @else @if ($total) {{ $total }} @endif @endif Sheets