Coding With Intent

Published on December 18th, 2013 • advanced

Ever find yourself slipping into your old procedural ways? Controller methods becoming 20+ lines long? Instead, delete it all, and rewrite your code with intent, or an end-result in mind. In this lesson, we'll use validation as an example for how to code in this way.

View the source code for this lesson on GitHub.

Continue Your Learning


Incremental Validation

Sep. 28th 2013

Validation in Laravel can be a confusing thing at first. Because the framework doesn't impose any specific conventions, it's left...


URL Shortener: Part 2

Jan. 26th 2014

Things really kick off in this lesson, where we'll dive into a number of techniques, including custom facades, validation, repositories...


Form Validation Simplified

Apr. 28th 2014

Form validation is an interesting thing. It's trivial to implement, yet everyone tackles it differently. In this lesson, I'd like...


Discussing Transports

Dec. 11th 2013

Controllers are like transports. They accept requests, and return responses. The core heart of our application ideally should have no...


Controller Cleanup

Nov. 4th 2013

If you're not careful, very quickly, your controllers can become unwieldy. Worse, what happens when you want to call a...