There are 3 tables (models): Booking, User, Hotel.
Booking belongsTo
both User and Hotel.
User hasMany
Booking, and Hotel hasMany
Booking, too.
How to get all Hotels, which User has Booking for them? As any array (collection) which is iterateable.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1i7DIK7
via IFTTT
Aucun commentaire:
Enregistrer un commentaire