@if ($workOrder->status == 2 || $workOrder->status == 3) @foreach ($workOrder->comments as $comment)
@php $image = $comment->user->image_url != null ? $baseUrl."/storage/".$comment->user->image_url : $baseUrl.'/build/images/default.png'; @endphp
{{ $comment->user->name }} {{$comment->created_at}}

{{$comment->notes}}

@if(!empty($comment->image_url))
@php $file = $comment->image_url != null ? $baseUrl."/storage/".$comment->image_url : $baseUrl.'/build/images/default.png'; $fileExtension = pathinfo($comment->image_url, PATHINFO_EXTENSION); @endphp @if (in_array($fileExtension, ['jpg', 'jpeg', 'png', 'gif'])) @else @endif
@endif
@endforeach @endif