Level 7
@Alizey Please relation type with table ?
May be it like below
//User have many Diseases
hasMany('Disease')
//Diseases under user
belongsTo('User')
more detail visit : eloquent relationships
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have 3 tables
Users
id
name
2nd Table Is Diseases
Having fields
id
name
And 3rd Table Is User_Dieases
Having fields
user_id
diease_id
How can i make that relation. I want to show Logged In user to their profile with their Dieases.
Have a look this lesson:
https://laracasts.com/lessons/many-to-many-relationships
Everything explained. Also the naming conventions (disease_user instead user_diseases)
Please or to participate in this conversation.