Skip to content

Instantly share code, notes, and snippets.

@mikelbring
Created March 22, 2012 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikelbring/2158826 to your computer and use it in GitHub Desktop.
Save mikelbring/2158826 to your computer and use it in GitHub Desktop.
<?php
$post = Post::find(1);
$post->comments()->insert(array(
'body' => $body,
'author' => $author
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment