title: What is the best way to make a post page with comments. Laravel - vue.js - inertia-vue
body: <p>I'm trying to make a discussion forum with comments, this is what it looks like 
  <a href="https://i.stack.imgur.com/HtPBY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HtPBY.jpg" alt="enter image description here"></a></p>
  
  <p>This page has the route </p>
  
  <p><code>Route::get('forums/comment/{id}', 'ForumController@comment');</code></p>
  
  <p>In the controller </p>
  
  <pre><code>public function comment($id){
      $forum = DiscussionForum::where('id', $id)
          -&gt;with('comment', 'user')-&gt;first();
      $comment = Reply::with('discussionForum', 'user')
          -&gt;where('discussion_forum_id', $forum-&gt;id)
          -&gt;orderByDesc('updated_at')-&gt;get();
  
      return Inertia::render('Forum/Comment.vue', [
          'forum' =&gt; $forum,
          'comments' =&gt; $comment
      ]);
  }
  </code></pre>
  
  <p>My question is how to then save this comment in the comment controller, in my vue file I have this method that gets executed when I press the save button </p>
  
  <pre><code>submit() {
      this.$refs.form.validate((valid) =&gt; {
          if (valid) {
              if (!this.form.id) {
                  this.$inertia.post('comments', {
                      comment: this.form.comment,
                      forum_id :this.form.id,
                  }).then(() =&gt; this.refresh())
              }
          } else {
              return false;
          }
      this.reset();
      });
  },
  </code></pre>
  
  <p>I also have this route for the comments</p>
  
  <pre><code>Route::resource('comments', 'ReplyController');
  </code></pre>
  
  <p>For the store function I have this</p>
  
  <pre><code>public function store(Request $request)
  {
      DB::beginTransaction();
      $comment = new Reply();
      $comment-&gt;user_id = auth()-&gt;user()-&gt;id;
      $comment-&gt;discussion_forum_id = $request-&gt;forum_id;
      $comment-&gt;comment = $request-&gt;comment;
      $comment-&gt;comment_time = Carbon::now();
      $comment-&gt;save();
      DB::commit();
  }
  </code></pre>
  
  <p>The problem is I get this error when I try to save the comment </p>
  
  <blockquote>
    <p>The POST method is not supported for this route. Supported methods: GET, HEAD.</p>
  </blockquote>
  
  <p>How can I fix this? or What is a better way to do this?</p>