When trying to create a new laravel project, The following error appears on the CLI:
Could not open input file: artisan
Script php artisan clear-c
If you're running your Laravel project in Vagrant and have just SSH-ed into the virtual machine, don't forget to cd /vagrant
before you try running artisan commands!
if you re in say my-project/app/somefolder
run in terminal cd ..
two times to get in my-project/
folder
After creating the project you should move in the folder before issuing the command
I just needed to make artisan
executable.
chmod +x artisan
...and it works without the php prefix then.
I also had the problem i just installed but forgot to jump the created project folder. So you need to jump your project folder.
cd project_name
and then serve php artisan command
Just try and execute the command in directory where all laravel code resides. Happened with me too, I was trying to run the command in project's root folder, but the code was in a sub directory