Spark is a Laravel package that provides scaffolding for a SaaS application and includes billing, subscriptions, authentication, payment, etc.
The instructions below are for setting up a Laravel Spark application (Spark v10.0) for local development on MacOS.
I’m assuming the following:
- you already have a local development environment suitable for running Laravel applications. For more information check out the Laravel docs
- you have purchased a licence and have received your token
Before we start, ensure you are running PHP 7.3
At time of writing (May, 2020) the Spark installer fails on PHP 7.4.
1. Install or upgrade the Laravel Installer
composer global require laravel/installer
Ensure you have >= 2.3.0 of the Laravel Installer installed.
2. Install the Spark Installer
Change into the spark-installer directory and run
Next, add the Spark Installer directory to your PATH
3. Run the Spark Installer
Add your token (from purchasing a Spark licence)
spark register <<token>>
Next, run the Spark installer
Note: it will create a new directory in whatever location you run the command
spark new <<project name>>
4. Configure application settings
.env file and add your projects settings, especially DB credentials.
Then, run the Spark migrations
php artisan migrate
As per the Spark docs, link the storage directory with
php artisan storage:link
You should now be able to load the site in your browser!
5. Accessing the developer “Kiosk” area of the site
app/Providers/SparkServiceProvider.php file and add your email address to the
Then, use the Register feature on the site to create an account, with that same email address.
Once this account has been created you’ll be able to see the Kiosk option on the top right menu under your Profile name.
Note: You can find all the Spark URLs via the routes file
More Spark tutorials