Laravel belongsTo not working

I have 2 models in my app, 'User' & 'MedicineType' (each User belongs to one MedicineType).

I made the one-to-many relation between two model using belongsTo() and hasMany(). hasMany() relation works perfectly but belongTo() doesn't work. Does anyone know where did I make a mistake?

Votes

In Progress 03-11-2019 Awais 1005

Please briefly explain why you feel this question should be reported .

Answers (1)

ZAID Qureshi Qureshi 240

10-02-2021

Please briefly explain why you feel this answer should be reported .

Hi

Leave An Answer

app logo
X

Download Our App!

Enjoy all the features. Browse jobs, articles, questions, scholarships and many more! in just one App