Cannot use my Artisan console. It simply just says php command not found
When I try to create a controller like this :
$ php artisan make:controller PostController it just leaves a space and cannot detect the php command.
and when i do it in git bash :
it says something like this in the git bash.
bash: php: command not found
and when I do composer dump-autoload.
$ composer dumpautoload
/c/ProgramData/ComposerSetup/bin/composer: line 10: php: command not found
Sounds like you don't have php setup properly for your command line.
I'm not sure how to set it up on windows (i use linux/mac), but you probably have to add the location of php to your PATH environment variable
Once you add the php location to your path, then you should be able to type
php -v
and it will show you the php version you are running.
PHP 7.1.1 (cli) (built: Jan 18 2017 18:51:14) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
Please or to participate in this conversation.