How can I apply this query in laravel 5? I have 3 table, Post, Profile, Comments
Post{id,title,body,user_id}
profile{user_id,last_name,first_name}
comments{comments,user_id,post_id}
I want to get this kind of structure:
post_id title post last_name first_name
and below are the comments
comments last_name fist_name
//post model
//comments model
//profile model
and i call it in the controller using:
Then it works:) Thank you for some help and idea :)