Question:

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');
    }
}

 

Answers:


Keywords:

© 2017 QuizBucket.org