title: Laravel 4. Getting ID of current post
body: <p>I'm making comments system, but at the momement I'm facing problem I can't solve. I got two database tables, posts and comments (I already created relationships). I have to assign comments for unique post. So first of all, post root is</p>
  
  <pre><code>Route::get('/playlists/{slug}'...
  </code></pre>
  
  <p>I created my comment route like this:</p>
  
  <pre><code>Route::post('/playlists/{slug}'...
  </code></pre>
  
  <p>So in CommentController, whenever validator passes I save comment details to comments table like this</p>
  
  <pre><code>    $comment-&gt;content = Input::get('content'); 
      $comment-&gt;post_id = ???????
      $comment-&gt;save();
  </code></pre>
  
  <p>So how do I recognize in laravel 4.2 in which post I'm wrriting a comment? At the current post root i can reach data for current post from post table, but the problem is that it's in view file only. Maybe there is some way to pass data from view to controller? Could you give me short example of this technique? Thanks!</p>