I have the following tables in my database:
- Blogs
- Blog_Comments
- Emotions
- Blog_emotion
- Users
Where Blog and Blog_comments has one to many relation. Emotions and Blog has many to many relation and blog_emotion is the pivot table. Lastly users and blogs has one to many relation.
I want to get the blogs with max comment and max emotion with the user. How can I do so in eloquent. I am using laravel 5.4
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire