Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Mar. 21st 2014

View Presenters From Scratch

Run Time 16:16

Download

Ever found yourself sneaking view-specific logic into your Eloquent model for convenience? Don't do that! Why should the model care or have knowledge of that sort of thing? Instead, leverage view presenters.

In this lesson, we'll tackle that very thing, while also reviewing a number of helpful techniques, including traits, singletons, and exceptions. When finished, don't forget to move on to the follow-up lesson!