Install Laravel Spark Using Homestead and Create an Application
If you want to use Laravel Spark and you are using Homestead, you have to follow these steps:
- Install Homestead
- Open a Vagrant SSH connection: vagrant ssh
- Add the Laravel Installer to composer: composer global require laravel/installer
- Navigate to the home directory cd ~
- Clone the spark installer directory git clone https://github.com/laravel/spark-installer.git
- Run composer install
- Add this line PATH=“$PATH:/home/vagrant/spark-installer“ to the end of the file ~/.bashrc
- Reload .bashrc: source ~/.bashrc
- Register your token: spark register YOUR_TOKEN
- Check your Token by using the command spark token
- Create the Code directory mkdir ~/Code and enter it cd ~/Code
- Create your new Spark application spark new MY_APPLICATION