Buy your loved one the ultimate gift. Lifetime gift certificates are $100 off.

Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Nov. 1st 2016

How to Accept Payments: Refactoring Strategies

Episode 8 Run Time 10:51

Download
In this episode, I'll demonstrate a few refactoring strategies that I often implement in my own projects. To clean up our SubscriptionsController, we might leverage form objects, as well as creating a dedicated Subscription class to manage any interaction with Stripe. In incremental steps, let's review the workflow.