Code from Laracasts tutorial @ https://laracasts.com/series/digging-in