2
votes

So I have a terminal and i am currently sitting in my project root where laravel and artisan sit. I am unable to call php or php artisan in the terminal... I can't do migrations or anything else and not sure what I am missing.

'php' is not recognized as an internal or external command, operable program or batch file.

1

1 Answers

1
votes

You need to add folder with php.exe to your system PATH variable:

  • Go to Control Panel and open the System icon (Start → Control Panel)
  • Go to the Advanced tab
  • Click on the 'Environment Variables' button
  • Look into the 'System Variables' pane
  • Find the Path entry (you may need to scroll to find it)
  • Double click on the Path entry
  • Enter your PHP directory at the end, including ';' before (e.g. ;C:\php)
  • Press OK

Restart your computer to make php artisan commands work.