Move that logic out of your view
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.
Check out the Mastering Laravel YouTube channel
- (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