0

I have issue with Artisan usage on Windows 10 with Xampp.

What have I done:

  1. clone project from git repositiory
  2. run composer install

In directory with project i trying run:

php artisan

but i get errror:

Could not open input file: artisan

But if i run command

php bin/console i get list of command like cache, debug, eloquent... so some tools are there... But none artisan...

How i can add/use artisan into existing project?

Lajdák Marek
  • 2,969
  • 8
  • 29
  • 58
  • what do you mean by `In directory with project i trying run`? which is your current directory from where you are firing `php artisan`. `composer update` followed by `composer dump-autoload` followed by `php artisan vendor:publish` – Rahul Nov 07 '19 at 10:04
  • Are you in the correct folder? Also see if there is a file name as artisan in your folder. – ascsoftw Nov 07 '19 at 10:04
  • 2
    if you don't have `artisan` in the root of your project, copy `artisan` from `laravel/laravel` on github https://github.com/laravel/laravel/blob/master/artisan and make it executable – lagbox Nov 07 '19 at 10:05
  • which laravel version do you have? – Maxim Abdalov Nov 07 '19 at 10:16
  • @lagbox sorry didn't notice your comment – Pavel Lint Nov 07 '19 at 10:22
  • Possible duplicate of [Could not open input file: artisan](https://stackoverflow.com/questions/26193314/could-not-open-input-file-artisan) – Areg Nov 07 '19 at 12:12

2 Answers2

3

Check if artisan file exists in your project root folder. If it does, then you're probably on the wrong folder. If it doesn't exist, you can just download it from the official repo.

Pavel Lint
  • 3,252
  • 1
  • 18
  • 18
-2

To configure an existing project, you'd typically check those things first :

You should goto app/config/database.php check file and verify username and password.

After check in Project Folder vendor folder and composer.json file exist then remove it (that remove old configuration now we going to fresh configuration).

Then after back to command prompt and fire command composer update and that download some dependent file download.

Now Run php artisan serve