Look at the code snippet. What relationship will it actually make?
class Comment extends Model { /** * Get the post that owns the comment. */ public function post() { return $this->belongsTo('App\Post', 'post_id', 'post_id'); } }
comments.post_id = posts.post_id
comments.post_id = posts.id
comments.id = posts.id
comments.comments_post_id = posts.id