In a previous post to the Laravel News site, the latest offering in the Laravel ecosystem, Spark, was introduced. In this post Matt Stauffer takes a "deep dive" into its features and functionality, digging down into the code to see what makes it tick.
If you've been around on the general Laravel-interested Internet over the last month or two, or if you attended Laracon US or Laracon EU, you've probably already heard of Laravel Spark. If you haven't, check out Taylor's introductory video from Laracon EU.I've held off on writing about it until now, because it has changed a lot over the span of its development. It's released as an Alpha now, so the API has solidified some... but it'll still change quite a bit between now and the release. [...] This is, instead, a deep-dive into how it works and what it does. I'll be writing a more general introduction to Spark once it's actually released, so beware: this is a bit of a deeper dive, for people geeky enough to want to look at an alpha release.
He starts with a recap and a high-level overview of the system, what it's designed to do and how to get it installed (either in a fresh install or an existing application). He then starts breaking down the pieces that make up the system:
- changes made to files in your current application
- details on the contents of the SparkServiceProvider
- the addition of an app.js defining the VueJs bootstrap for the interface
He then starts looking at the interface, showing how to register a new user (with two-factor auth), work with the "teams" functionality to group users and create payment and plan options for your products.