Move that logic out of your view
Update: 2024-02-06
Description
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
Comments
Top Podcasts
The Best New Comedy Podcast Right Now – June 2024The Best News Podcast Right Now – June 2024The Best New Business Podcast Right Now – June 2024The Best New Sports Podcast Right Now – June 2024The Best New True Crime Podcast Right Now – June 2024The Best New Joe Rogan Experience Podcast Right Now – June 20The Best New Dan Bongino Show Podcast Right Now – June 20The Best New Mark Levin Podcast – June 2024
In Channel