Episode Details

Back to Episodes

Move that logic out of your view

Episode 93 Published 2 years, 3 months ago
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
Listen Now

Love PodBriefly?

If you like Podbriefly.com, please consider donating to support the ongoing development.

Support Us