Tag Archives: database

Eloquent relations in Laravel

Posted in PHP on July 25, 2016

One of the powerfull features of Laravel are the eloquent relations. They make it easy to retrieve and store relevant information from a database without writing complex queries. In order to use the eloquent relations, one has to correctlty set up the database and define relations in the corresponding models. This blog post explains how to achieve this.

Read more

Accessors and mutators in Laravel

Posted in PHP on May 30, 2016

A common issue when building a webapplication is the case where you want to display variables in a different format than they are stored in your database. For example, dates are by default stored as yyyy-mm-dd, but in the Netherlands dates are written as dd-mm-yyyy. Or maybe you stored the names of your users in lowercase, but you would like to show them with a capital. For those kind of situations, the accessors and mutators of Laravel are of great use.

Read more

Using Git in team development (part 2)

Posted in Development on September 17, 2014

The second part about collaboration using the version control system Git. Here we discuss the heart of this collaboration with the Git commands push and pull. Because the major CMS systems around (e.g., WordPress, Drupal, Joomla) work with databases to save your sites configuration it is also important to sync your database between the developers, and more importantly, between the local development environments and the staging and live environments.

Read more