Level 26
Post::with('comments')->get() .. Replace comments with the relation name of yours and Post with the Model of yours :)
1 like
i am using one to many relationship
but i confuse how to get comments in each post
for example
my post hasMany comments
and comment belongsTo post
in my view i am fetching all with pagination but it won't work help me what to i do
don't suggest for riari forum
Please or to participate in this conversation.