title: Laravel5: retrieving post_id from a hidden input returns null
body: <p>I have a working comment form with <code>$post-&gt;id</code>  that submits data via ajax, notice there isn't any form tags.</p>
  
  <pre><code>&lt;div class="comment-fields"&gt;
      &lt;div class="row commenter-comment"&gt;
          &lt;div class="form-group col-md-12"&gt;
              &lt;textarea id="commenter_comment" name="commenter_comment" class="form-control comment-field" title="User's comment" placeholder="Comment Text"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="row commenter-name-email"&gt;
          &lt;input type="hidden" id="commenter_parent" name="commenter_parent" class="commenter-parent" value="0"&gt;
          &lt;input type="hidden" id="commenter_post" name="commenter_post" class="commenter-post" value="{{ $post-&gt;id }}"&gt;
      &lt;/div&gt;
  
      &lt;div class="row commenter-captcha"&gt;
          &lt;div class="col-md-3"&gt;
              &lt;a href="javascript:void(0)" class="btn btn-success post-this-comment"&gt;Comment&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And this is the javascript handler</p>
  
  <pre><code>$(document).on('click', 'a.post-this-comment', function(){
      var form_data = {
          'per_page': $('.comments_per_page').val(),
          'commenter_parent': $('#commenter_parent').val(),
          'commenter_post': $('#commenter_post').val(),
          'commenter_comment': $('#commenter_comment').val(),
      };
  
      var arr = [
          'commenter_parent',
          'commenter_post',
          'commenter_comment'
      ];
  
      for (var i in arr, i &lt; arr.length, i++) {
          var elem = arr[i];
          form_data[elem] = $('#' + elem).val();
      }
  
  // console.log(form_data); // something like =&gt; Object {per_page: "some_value", commenter_parent: "some_value", commenter_user_id: "some_value", commenter_comment: "some_value"}
  
      var request = $.ajax({
          type: 'POST',
          url: 'post_this_comment',
          data: form_data,
          dataType: 'json'
      });
  
      request.done(comment_done_handler);
      request.fail(comment_fail_handler);
  });
  </code></pre>
  
  <p>All I want to do is get the post id of the current post so I can tell the comment_list() to get me only the comments of that post.</p>
  
  <p>I cannot even get the value of <code>commenter_post</code> from <code>comment_list()</code> method, I get null. But I am able to retrieve the values from other methods just fine.</p>
  
  <p>so I have added a hidden field (without form tags) to a partial that retrieves the <code>post_id</code></p>
  
  <pre><code>&lt;input type="hidden" id="post_id" name="post_id" class="post-id" value="{{ $post-&gt;id }}"&gt;
  </code></pre>
  
  <p>However, when I try to get the value of that field, I always get <code>null</code></p>
  
  <p><code>Comment</code> Model</p>
  
  <pre><code>public static function root_comments($postId) { // setting $postId
      return self::child_comments(0, 'desc')-&gt;where('post_id', $postId);
  }
  </code></pre>
  
  <p><code>CommentController</code></p>
  
  <pre><code>protected function comment_list($per_page, Request $request) {
      $post = Input::get('post_id');
      dd($post); // returns null
      $root_comments = Comment::root_comments(1); // I am setting the postId manually here
      $root_with_replies = $this-&gt;include_replies_for($root_comments);
      $paginated_comments = $this-&gt;paginate($root_with_replies, $per_page, $request);
      return $paginated_comments;
  }
  </code></pre>
  
  <p>Index() method on CommentController</p>
  
  <pre><code>public function index(Request $request) {
          $view_data = self::view_data($request);
          return view('eastgate.comment.leave_a_comment', $view_data);
  }
  </code></pre>