I've somehow got myself in a situation where to run any terminal commands I have to prefix it with php
. For example to run composer commands I have to run:
php /Applications/MAMP/bin/php/composer
The problem I'm having is that when I then try to install a new laravel project by running:
php /Users/ian/.composer/vendor/bin/laravel new my-project
I get the error:
sh: composer: command not found
What is the best way to resolve this so I don't get the above error and can just use composer
again going forward?