How to make relationships in models | Laravel
Ever wondered on how relationships work in Laravel models? Well in this tutorial I’ll be explaining everything you need to know about relationships in laravel (eloquent).
—NOTES—
one to many | hasmany
many to one | belongto
many to many | belongstomany
one to one | hasOne(table with no foreign key) belongsTo(table with foreign key)
—————–
Why not join the streams on :
1. http://www.twitch.tv/nubnub90
2. https://beam.pro/nubnub90
3. htpps://hitbox.tv/nubnub90
4. https://www.youtube.com/channel/UCK6h7pNIUKrMIqjM3zqwB1g
You can always talk to my through twitter : https://twitter.com/nubnub90
Still reading? Well thank you! Looks like you want to know more about me. Why not start with subscribing?
You can also join my discord : https://discord.gg/GyvbRFD
Supporting me can be done trough Patreon: https://www.patreon.com/nubnub90
Random words of the day : Relationships
source