Search code examples
bashlaravelubuntuvagrantlaravel-spark

How do I setup the Laravel Installer & Laravel Spark Installer's bash PATH?


I am struggling with the Laravel & Spark Installers with regard to the bash 'PATH' update step. I have always used Composer to setup my Laravel projects manually.

I am working with Ubuntu 14.04 on a Vagrant Box.


Solution

  • Finally figured it out. The Laravel Installer installs globally but the Spark installer gets installed locally, so you have to add 2 PATH to your OS .bashrc.

    For me, composer global installed the Laravel installer to ~/.composer/vendor/bin (When you install the Laravel installer via composer global, it will tell you where it was installed.) and I cloned the Spark installer into /usr/share/nginx/spark-installer.

    Open your .bashrc file:

    vim ~/.bashrc
    

    Add 2 new lines to the bottom (use your paths):

    # Laravel Installer
    export PATH="$PATH:$HOME/.composer/vendor/bin"
    
    # Spark Installer
    export PATH="$PATH:/usr/share/nginx/spark-installer"
    

    Reload your .bashrc:

    source ~/.bashrc