Additional constraints using one-of-many relations in Laravel
One of many is a new type of relationship that has been added to Laravel in the latest minor version which adds some amazing possibilities. The relationship adds the ability to load a single record from a hasMany relation using an aggregate to determine the “sorting” of the records. For example, this allows you to get the record with the...