Laravel is a type of free, open-source PHP web framework that uses composer as a tool for integrating dependencies and libraries in it.
It has a command-line interface called Artisan.
The command used to start a Laravel service is given below,
Recently some of our clients got the error like “Could not open input file: artisan” error when starting the Laravel service using the above command.
Cause and solution for “Could not open input file: artisan” error in Laravel :
There are mainly two causes that can be behind this error.
- Incorrect console location
There is a chance of getting this error when you are running the “php artisan” command outside the Laravel project folder.
You should run the “php artisan” command inside the Laravel project location.
cd my_laravel_project/ php artisan
You can replace the “my_laravel_project/” with your Laravel project location.
2. Missing correct permission for artisan
There is sometimes a chance of the artisan not being executable, in that case, the artisan command cannot able to access and it will throw an error like this.
So you need to confirm that artisan is executable.
chmod +x artisan
If you are still stuck in solving this Laravel issue, our technical support team will resolve it for you.