Beyond Controllers in Laravel: Finding the Right Place for Logic
summary
Examines where to place application logic in Laravel projects, comparing controllers with alternative locations such as services, actions, jobs, and form requests. Discusses structuring code to keep controllers thin by moving responsibilities into appropriate classes and Laravel features to organize business logic.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 3:17Monolithic controller problems
- 7:13Route model binding
- 10:06Logic in action classes
- 12:52Events after updates
- 15:18Observers and accessors
- 17:22Scopes and resources
- 18:48Helpers and value objects
- 20:32Traits and abstract classes
- 21:36Package development benefits
- 22:41Repository pattern misuse
- 23:02Refactoring principles
- 24:26Staying updated
