post_index.blade.php 648 B

12345678910111213141516171819202122232425262728293031
  1. @extends ('layout')
  2. @section ('content')
  3. <a href='{{ route('cntrl.create') }}'>New Post</a>
  4. <div class='feed'>
  5. @foreach ($posts as $post)
  6. <div class='feedPost'>
  7. <h3>
  8. <a href="{{ route('cntrl.show', [$post['id']])}}"> {{ $post['title'] }} </a>
  9. </h3>
  10. <div class='postText'>
  11. {{ $post['text'] }}
  12. </div>
  13. <div class='commentCount'>
  14. {{ $post['commentCount'] }}
  15. </div>
  16. <div class='commentCount'>
  17. @foreach($post['tags'] as $tag)
  18. <a href='/tag/{{$tag['tag']}}'>{{$tag['tag']}}</a>
  19. @endforeach
  20. </div>
  21. </div>
  22. @endforeach
  23. </div>
  24. @endsection
  25. @section ('title')
  26. create
  27. @endsection