Being new to Laravel, I am following a couple of tutorials.
I could go through the first one covering the basics almost with no issue, using only the AMP environment built in Mac OSX Mavericks.
I am now moving on to a more complex one to learn how to create an app from A to Z, and this one requires Homestead, that I have been able to install and setup.
If I try to create a Laravel App with the composer
command, it works just fine.
However, as soon as I try to create an app with the laravel new
command, I get the following error message:
-bash: laravel: command not found
I have read many answers to similar questions, but none of these seem to fix my problem, because:
- I do have mcrypt installed
- I tried the
sudo chmod +x /usr/local/bin/laravel
to give execute permission to the folder - and Laravel is working on my computer, since I have already created a couple of apps.
So, why can't I use the larval new
command? Do I need to update/install something else?
I can provide you with additional information/code/logs if necessary.
[EDIT]: I found the answer to my own question.
The solution was simply to place the ~/.composer/vendor/bin
directory in the PATH with the following export PATH="~/.composer/vendor/bin:$PATH"
command in Terminal, as explained here: https://laracasts.com/discuss/channels/general-discussion/trying-to-make-use-of-the-laravel-installer .