Back to the Learning

Beep Beep. Subscription Required.

Laracasts is packed full with over 1,500 lessons just like this one.
Sign up to get full access or log in to your account and sit back.

Your Teacher | Jeffrey Way's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.

About This Episode

Published on Aug 8th, 2016

So you have a single post model, and you want to fetch the username of the most recently published comment. How exactly do we do that? Well, I'll show you a few techniques you might use, ranging from adding a hasOne relationship, to leveraging the law of demeter, to applying simple joins.

Thanks so much to Wadday Hassan for the question. If the rest of you have any questions that could be answered in video-form, tweet your question and add the hash tag, #helpMeLaracasts.

Back to Series Button