123456789101112131415161718192021222324252627282930313233343536373839 |
- @extends ('layout')
- @section ('content')
- <div class='feed'>
- <div class='feedPost'>
- <h1>
- {{ $post['title'] }}
- </h1>
- <div class='postText'>
- {{ $post['text'] }}
- </div>
- <a href="{{ route('cntrl.edit', [$post['id']])}}">Edit</a>
- <form action="{{ route('cntrl.destroy', [$post['id']])}}" method='POST'>
- @method('delete')
- @csrf
- <input type='submit' value='Delete' />
- </form>
- </div>
- <div class='comments'>
- @foreach ($comments as $comment)
- <div>
- {{ $comment['text'] }}
- </div>
- @endforeach
- </div>
- <form action="{{ route('comment.store')}}" method='POST'>
- @method('post')
- @csrf
- <input type='hidden' name='post_id' value="{{$post['id']}}" />
- <textarea name='text'></textarea>
- <input type='submit' value='Submit' />
- </form>
- </div>
- @endsection
- @section ('title')
- create
- @endsection
|