Posted: 17-11-2017

Laravel Eloquent Parent Child Relationship

Laravel Eloquent Parent Child Relationship

A post from Dan Pastori that explains  how to makes  parent /child relationship in Eloquent 

This tutorial will show how to do a parent/child relationship on the same model, in the same database. What we will be doing is expanding our data for adding cafes by allowing the user to add multiple locations for each cafe. These should be stored as an individual record in the cafes table. This will be a perfect example of a parent to child relationship in Laravel.