November 14, 2016

Convert the Laravel Spark invoice email to a Mail Notification email

Recently when customizing the invoice email template for Laravel Spark I noticed that it didn’t have any styles applied (raw HTML emails are a bit 1999). Given how good the new Mail Notifications look in Laravel 5.3 I figured it would make sense to convert the existing invoice email template to the new Mail Notifications. Here is how I did it:

Note that I had to create a new custom.php route file so that the web middleware wasn’t being applied to the Stripe webhook route, hence the modification to RouteServiceProvider.

Looking for more?

Subscribe to my newsletter to get infrequent updates in your inbox. Or follow me on Twitter.