Laravel : Join within query using Eloquent
问题 I have a five tables in which i need to get data from all this. post,product,categories,attributes,post_attribute I have a query in my model that collect all post for a one product and it contains categories and attributes details . Query : Post::with(['product.categories.attributes'])->whereStatus("Active")->get(); Response: "PostDetails": [ { "id": 153, "user_id": 3, "product_id": 1, "demand_or_supply": "Demand", "description": "This is a post description three", "image_one": null, "image