Spark provides all of the scaffolding you need to get started developing your next big idea. Authentication, API tokens and authentication, subscription billing, payment method updates, invoicing, password reset, and more is included out of the box.
In this guide, we'll walk through installing Spark and writing the first view for your application.
You may install Spark using the Spark installer. The Spark installer is a CLI tool which may be used to create new Spark projects. Once you have installed and registered your installer, create a new Spark application. For example, let's pretend we're creating a to-do list application:
spark new todo
Once Spark is installed, make sure the NPM dependencies have been installed via the
npm install command, the
gulp command has been executed, and the database migrations have ran. You should also configure your e-mail address as a "developer" so that you have access to the Kiosk. Simply add your e-mail address to the
$developers property in the
Note: If you need a development environment for your Spark project, be sure to check out Homestead.
Once your Spark project has been created, take a look at the
App\Providers\SparkServiceProvider class. The
booted method of this class is used to define your application's subscription plans. By default, one free plan and one paid plan is defined. You should change the ID of the paid plan from
provider-id-1 to match the ID of one of your plans that is actually defined in Stripe or Braintree.
Note: Spark does not automatically define plans within Stripe / Braintee. You must define those manually on the provider of your choice.
By default, Spark is configured to require no credit-card up front and to grant new users a free trial period of 10 days. This configuration should work perfectly for the majority of applications. For more information on configuring billing plans, check out the billing documentation.
Once Spark has been installed and your billing plans are configured, you're ready to start building your application. By default, Spark installs a
/home route in your
app\Http\routes.php file which displays the
home Blade template. You are free to edit the
home.blade.php template as needed to build your application.
home.blade.php file also represents the
home Vue component, which is defined at
Of course, at this point, you may simply build your Laravel application however you wish. Spark has already installed scaffolding for all of the subscription management, authentication, and other settings views. Now it's time for you to build your dream!
For more information on using Spark, check out the rest of this documentation, which includes information on back-end customization and front-end customization, as well as documentation pages covering many other areas of Spark. It's very important that you read through this documentation in its entirety.
You may download a sample to-do list application built on Spark to learn more about building Spark applications. This demo application can be used to get a basic idea of how to get started building your own application after installing and configuring Spark. The to-do list contains a basic task list and an activity log of completed tasks.
In order to download the demo application, you must have a valid Spark license.