The basis of this tutorial is to establish a ‘many to many’ relationship in a database and the eloquent model. A common situation where this would occur could be on a blog where posts have associated tags. The reason being is – a post can have many T...
Previously we set up our migrations for our database in Part 1. Now these migrations need to be reflected within our model so once we query our model we can retrieve the information from the database. Reference https://laravel.com/docs/5.1/eloque...
In Part 1 we looked at preparing the database relationships, Part 2 involved reflecting those relations in our models in order to obtain the data we need via the methods. Now we have access to the information in the database, this chapter will outlin...