3

I'm new to Laravel ad i have just created new project using official laravel documentation.

After installing when i run php artisan migrate it will showing

Could not open input file: artisan error in console

Listing of commands that i run

  1. composer create-project --prefer-dist laravel/laravel laravelDemo

    which will create new folder laravelDemo

  2. cd laravelDemo

  3. php artisan migrate

I'm using Ubuntu 16.04

I have already checked possible duplicate answer but i have installed it throw composer.

Please help Thanks in Advance :)

8
  • @Tiger yes i already checked that answer but i have download it from composer as you can see my commands that i run. Commented Nov 24, 2016 at 8:59
  • Are you in your project directory ? Commented Nov 24, 2016 at 9:00
  • @Tiger yes please look second step. Commented Nov 24, 2016 at 9:00
  • run this command composer update --no-scripts Commented Nov 24, 2016 at 9:15
  • @Tiger still the same issue Commented Nov 24, 2016 at 9:23

4 Answers 4

2

Not figure out what actual problem is but what i did is deleted laravelDemo folder and run above command and it worked.

i have also tried composer update --no-scripts which will updated all the composer dependencies successfully.

May be there were some issue in installing the project.

Sign up to request clarification or add additional context in comments.

Comments

1

check that the project contains the artisan file, it's a php.

<?php

define('LARAVEL_START', microtime(true));

require __DIR__.'/vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';



$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);

$status = $kernel->handle(
    $input = new Symfony\Component\Console\Input\ArgvInput,
    new Symfony\Component\Console\Output\ConsoleOutput
);


$kernel->terminate($input, $status);

exit($status);`

Comments

1

The problem is you type the command out of laravelDemo folder. please go into this folder by running: cd laravelDemo and try again.

Comments

0

i my case, i decide to reinstall all my project and it work fine

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.