
Episode 93
Move that logic out of your view
No Compromises · Joel Clermont and Aaron Saray
February 6, 202410m 16s
Audio is streamed directly from the publisher (media.transistor.fm) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
Ever feel like your Blade views are getting too logic-heavy? What logic belongs in the view, and what logic would be better somewhere else? We use a recent PR discussion to talk through these points.
- (00:00) - Trying to keep logic out of the Blade view
- (02:00) - Using the simplest form of logic
- (03:45) - Business logic doesn't belong in the view layer
- (04:15) - Condition moved into the controller
- (05:20) - Secondary benefit of testing
Check out the Mastering Laravel YouTube channel
Topics
LaravelPHP