If you change the comment function to skip $post_id
does it work?
public function newComment()
{
$post = Post::find(Input::get('post_id'));
if ( ! $post) return Redirect::action('BlogController@index');
$comment = New Comment();
$comment->user_id = Auth::user()->id;
$comment->body = Input::get('body');
$post->comments()->save($comment);
return Redirect::action('BlogController@index');
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community