Laravel 5.5 includes a new
helper() function, which you can think of as a generic null object implementation. Have you ever run into the situation where you need to fetch a property from a relationship, but it's possible that the relationship itself returns
null? Well now we have a cleaner way to do this.