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?


In Progress 03-11-2019 Awais 1183

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

Answers (1)

ZAID Qureshi Qureshi 240


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


Leave An Answer

app logo

Download Our App!

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