0

I got the following error when I run a command with php:

D:\laragon\www\Cultivation>php artisan migrate

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

Why I get this error?

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
quangdev
  • 7
  • 2
  • 8

1 Answers1

1
  1. open Advanced system setting
  2. click on environment variable
  3. in system variable section find Path and edit this
  4. add php path (for example "C:/xampp/php") and save it

or if you use phpstorm terminal do this

  1. open phpstorm setting in file menu
  2. go to tools tab
  3. click on terminal
  4. add php path in environment variable