Posts with database Tag

Many to Many Relationship - Migrations

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...

Read more

Many to Many Relationship - Models

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...

Read more

Many to Many Relationship - View

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...

Read more

Artisan Tinker With Laravel

A neat tool to literally tinker/interact with your website. It's new to me at the moment but I currently use it to test relationships between models and fiddle with the database. To use Tinker, bring up the command line interface and we'll move to...

Read more