Search code examples
phplaravelframeworkslaravel-artisan

'laravel' is not recognized as an internal or external command?


I am trying to install laravel on windows. after downloading laravel via composer

I tried to run laravel new command but I get this error:

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

I changed the environment variables but still cant run the command unless I go to the path and run it from there.

enter image description here

enter image description here


Solution

  • Instead of adding a new variable, you have to add the path to laravel to the PATH variable:

    <old value of path variable>; C:\vendor\bin