I'm new to Laravel, let me straight forward to the question.
Suppose I have 'Posts' table and 'Comments' table
And the first 'Post' has 3 comments,
What is the best query method to achieve this kind of result
Post => (
[0]=> array (
[id]=>1
[content]=> This is my first Post!
[comments]=> array(
[0]=>array(
[id]=>1
[post_id]=>1
[content]=> First comment!
)
[1]=>array(
[id]=>2
[post_id]=>1
[content]=> Second comment!
)
[2]=>array(
[id]=>3
[post_id]=>1
[content]=> Third comment!
)
)
)
)