Use the project's root folder
Artisan comes with Laravel by default, if your php
command works fine, then the only thing you need to do is to navigate to the project's root folder. The root folder is the parent folder of the app
folder. For example:
cd c:\Program Files\xampp\htdocs\your-project-name
Now the php artisan list
command should work fine, because PHP runs the file called artisan
in the project's folder.
Install the framework
Keep in mind that Artisan runs scripts stored in the vendor
folder, so if you installed Laravel without Composer, like downloading and extracting the Laravel GitHub repo, then you don't have the framework itself and you may get the following error when you try to use Artisan:
Could not open input file: artisan
To solve this you have to install the framework itself by running composer install
in your project's root folder.
app
. I still forget where I am every now and then in the middle of a project. Typingpwd
sure helps.