vendredi 21 août 2020

Relationship between user and store

I need to create a relationship between user and many stores. I have created a three models

Store Model

id name email            phone       info
1  xyz  xyz@gmail.com    9329292922  Small Store
2  abc  abc@gmail.com    9494949449  Some Store

User Model

id name email                  
1  ewd  ewd@gmail.com   
2  xcv  xcv@gmail.com    

User_Store

user_id     store_id
   1          1
   1          2

What does the user_store model contain relations whether it is belongstoMany or hasmany?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Qc725d
via IFTTT

Aucun commentaire:

Enregistrer un commentaire