Enabling Developer Kiosk0:00
Hi, this is Taylor Otwell, back with another Laravel screencast. And in this screencast, I want to talk about Laravel Spark's developer kiosk. The kiosk is sort of a backend interface where you can get cool information about how your app is doing in terms of revenue, make announcements to your users, and even impersonate other users that have signed up for your application. Now let's go ahead and log into Spark and take a look at things. Now when I'm logged in, if I go to my top right account drop down, you can see that I don't have any link to the kiosk by default. And what you need to do is register the email address of your account as a developer in the SparkServiceProvider of your application. So let's go ahead and do that. If I jump over to Sublime Text in my SparkServiceProvider, if I scroll down here, there's a developers array. And within this array, I can put an email address. So
Making User Announcements0:41
and do that. If I jump over to Sublime Text in my Spark service provider, if I scroll down here, there's a developers array. And within this array, I can put an email address. So taylor@laravel.com, for example. Now you can specify it here statically, or in your booted method, you can even do Spark::developers() and pass an array here too, if you want to do it dynamically. All right, so once you have your email address registered as a developer, let's go ahead and just reload the screen. And you can see here on this drop down, I now have access to the kiosk. So that lets me get some sort of admin functionality for the application. So let's walk down the screen from top to bottom and take a look at what we can do in the kiosk. Now the first thing we can do is make announcements. And what that does is push notifications out to your users under this notifications or announcements area
Scheduling KPI Logging3:22
Let's jump back to the kiosk and take a look at what else we can do. Now this metrics tab is really cool. This shows you your current monthly recurring revenue, your yearly recurring revenue, and your daily or total volume, and how many users are currently trialing your application, as well as how many users are subscribed to your various plans or trialing your various plans. So this lets you get an overview for how popular a given plan is for your application. All right, so what's also cool about this screen is you can log your performance data nightly, and that will show you pretty graphs and charts of how your application is doing. So let me show you what that's like. So basically what you want to do is come into your console schedule, which is in your console Kernel, and within your schedule you can schedule the Spark KPI command to run daily. All right, and this will just take a snapshot of your monthly
Generating Metrics Charts4:04
which is in your Console\Kernel, and within your schedule you can schedule the Spark KPI command to run daily. All right, and this will just take a snapshot of your monthly recurring revenue, your new users, your volume, and it will log it to your performance indicators table of your Spark application. And once you do that, Spark will start generating really nice looking charts of your monthly recurring revenue and other metrics. So I've actually created a test route here to load up that table with some dummy data. So I'm just going to put a hundred rows in this performance indicators table with some random values, just so I can show you what these charts look like. So let's hit this metrics route to load up this table, and then we'll come back to the kiosk and take a look at the charts. All right, so I've loaded up that table with some data. Let's go back to our kiosk and hit this metrics tab, and you can see now we have nice
