MCQs > Website Designing & Development > Laravel Framework > If blog post has infinite number of comments we can define one-to-many relationship by placing following code in post model?

Laravel Framework MCQs

If blog post has infinite number of comments we can define one-to-many relationship by placing following code in post model?

Answer

Correct Answer: public function comments() { return $this->hasMany('App\Comment'); }

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Laravel Framework Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Laravel Framework Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it