Working with nullable fields in Eloquent models

May 15th, 2015

Nullable model attributes still need to have their value explicitly set to null in order to be persisted as null. If you have a few nullable fields across a multiple models, the duplication of code can get unwieldy.

An Envoyer-like deployment script using Envoy

March 19th, 2015

As the release of was announced last week, I finally spent a bit of time looking into making use of Laravel's Envoy. in Homestead fails to restart nginx

March 16th, 2015

A slight change was made to the command in February 2015 that caused serve function to incorrectly set the listen port in the nginx config. Here's a brief discussion of the problem and a simple fix.

Eloquent ORM, route model binding, and repositories

March 12th, 2015

As you progress as a developer, you learn more and more ways to achieve a given outcome. The more knowledge you have, however, the more difficult it can be to determine when to use any given option over another. In this post, I discuss using the Eloquent

Filtering models with Eloquent in Laravel

March 3rd, 2015

The Eloquent ORM that ships with Laravel is a very powerful tool; it simplifies many tasks - from relationships between models to eager loading. In this post, I talk about query scopes and how they can be leveraged in order to perform filtering of model r

Simple environment switching in Laravel 5

February 26th, 2015

When Laravel 5 was released, the app configuration structure was changed so that the environment-specific configuration files were dropped. Some people desire the ability to 'switch' between environments in a simple manner. This is one approach that allow