소스 검색

Show that there are no comments if there are indeed no comments

axkuhta 1 년 전
부모
커밋
c6b8a8cdae
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      resources/views/include/comments.blade.php

+ 4 - 0
resources/views/include/comments.blade.php

@@ -34,9 +34,13 @@
 
 	<input type="submit">
 </form>
+@if (count($comments) == 0)
+	<p>Комментариев нет.</p>
+@else
 @foreach ($comments as $row)
 	<p>
 		<div>{{ $row->name }} ({{ $row->created_at }}):</div>
 		<div>{{ $row->content }}</div>
 	</p>
 @endforeach
+@endif