درباره این درس
We hear about the single responsibility principle constantly. But, if we all agree that it's a good pattern to follow, then why do our controllers have so much junk in them? In this lesson, we'll take a bird-eye view of a typical controller, and discuss how it might be cleaned up using dependency injection and service objects. In a follow-up lesson, we'll move on to reviewing observers (via Laravel's Event class), and how that can further improve our code.