Installing Spark via Composer
Before installing Spark, you will need to purchase a Spark license. You can purchase a Spark license via the Spark dashboard.
composer.json file:
composer.json
laravel/spark-paddle or laravel/spark-stripe package to the list of required packages in your composer.json file:
composer.json
composer.json file has been updated, run the composer update command in your console terminal:
composer update, you will be prompted to provide your login credentials for the Spark website. These credentials will authenticate your Composer session as having permission to download the Spark source code. To avoid manually typing these credentials, you may create a Composer auth.json file and use your API token in place of your password:
auth.json
auth.json file via your terminal using the following command. As mentioned previously, you may create an API token via the Spark dashboard. This token may be used as a substitute for your password when creating a Composer auth.json file:
You should not commit your application’s
auth.json file into source control.spark:install Artisan command:
migrate Artisan command:
If you are using the Stripe edition of Spark and plan to bill a model other than the
App\Models\User model, you should follow these instructions before running the migration command.config/spark.php configuration file and begin configuring your Spark installation.
Authenticating Spark in Continuous Integration (CI) Environments
It’s not advised to store yourauth.json file inside your project’s version control repository. However, there may be times you wish to download Spark inside a CI environment like Chipper CI. For instance, you may wish to run tests for any custom tools you create. To authenticate Spark in these situations, you can use Composer to set the configuration option inside your CI system’s pipeline, injecting environment variables containing the credentials you use to login to the Spark dashboard and a valid Spark dashboard API token:
Expired Licenses
If your Spark license has expired and you don’t want to renew the license yourcomposer.json file will need to specify the last version of Spark released before your license expired:
composer.json