Ref: Spark Installer.
install laravel spark
Before getting started, make sure you have the laravel/installer package globally installed using Composer.
composer global require laravel/installer
export PATH="~/.config/composer/vendor/bin:$PATH"
clone the laravel/spark-installer repository from GitHub into any location on your machine.
git clone https://github.com/laravel/spark-installer.git
Once you have cloned the installer, be sure to run the composer install command within the cloned directory so the installer's dependencies will be installed.
composer install
Next, make sure the spark-installer directory is added to your systems $PATH variable, so that your machine will be able to locate the spark executable when you issue Spark commands.
export PATH=$PATH:$PWD
You can test this by typing the spark in the command. This should give you back some information like the usage information version number etc
spark
Now that you have the Spark installer, you need to register your Spark API token with the installer. You may create an API token from the API settings dashboard. Once you have created a token, register it with the installer using the register command:
spark register token-value
If you would like to view the currently registered token, you may use the token command:
spark token
Once you have installed the Spark installer and registered your API token, you may create new Spark projects using the new command: This command will create a new Laravel project in a directory matching the given project-name. Spark will then be automatically installed into the project and configured.
spark new project-name
Once the new Spark project has been created, you will need to migrate your new project's database using the php artisan migrate Artisan command.
php artisan migrate