In this episode, I'm working on the Laracasts codebase. Specifically, I need a simple way to quickly generate single-use coupon codes, save them to the database, push them to Stripe.com, and then fire off an email to the recipient of the coupon. Let's use TDD to implement this functionality, and then, once we're at green, perform a round of refactoring to clean things up. Ready?
Published on Apr 14th, 2017.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.