php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program in Laravel 1
You get this error when you try to run php artisan command like:
php artisan cache:clear
You need to add PHP.exe folder to your System PATH variables, so PHP can be accessed via terminal.
If you are using WAMP, path of php.exe file should be like given below:
In XAMPP, it will be like :
PHP.exe file path in Bitnami:
To add new PATH variable, follow this:
1. Right click on My Computer, select Properties.
2. Select Advanced System Settings.
3. In the System Properties window, click the Environment Variables button.
4. Select System Variables -> PATH and click Edit.
5. Enter the folder where your PHP.exe is located.
6. Now click on SAVE button to save the changes you made.
If you did this correctly, restart your terminal and type php --version to check if it works.
Note: Don't forget to seperate paths by using ; seperator.