@foreach ($incidentComments as $incidentComment) @if ($incidentComment->user_id != auth()->user()->id) @php if ($incidentComment->user->role_id == 2) { $profile = $incidentComment->user ? $incidentComment->user->student->student_photo : '/backEnd/img/admin/message-thumb.png'; } elseif ($incidentComment->user->role_id == 3) { $profile = $incidentComment->user ? $incidentComment->user->parent->fathers_photo : '/backEnd/img/admin/message-thumb.png'; } else { $profile = $incidentComment->user ? $incidentComment->user->staff->staff_photo : '/backEnd/img/admin/message-thumb.png'; } @endphp
{{ $incidentComment->user->roles->name }}-{{ $incidentComment->user->full_name }}-{{ dateConvert($incidentComment->created_at) }}
{{ $incidentComment->user->roles->name }}-{{ $incidentComment->user->full_name }}-{{ dateConvert($incidentComment->created_at) }}