<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    @foreach ($allpost as $post)
    {{ $post->detail }}[<a href={{ url("posts/$post->post_id/edit") }}>edit</a>]
    <form action={{ url("posts/$post->post_id/") }} method="post">
      @csrf
      {{ method_field('DELETE') }}
      <button type="submit">delete</button>
    </form>

    {{ $post->user_id }}<br>
    <hr>
    @endforeach
    <a href={{ url('posts/create') }}>create new post </a>
  </body>
</html>
