laravel 无法打开输入文件:工匠 (5.3)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40781689/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
laravel Could not open input file: artisan (5.3)
提问by Binit Ghetiya
I'm new to Laravel ad i have just created new project using official laravel documentation.
我是 Laravel 的新手,我刚刚使用官方 Laravel 文档创建了新项目。
After installing when i run php artisan migrateit will showing
安装后,当我运行php artisan migrate 时,它会显示
Could not open input file: artisanerror in console
无法打开输入文件:控制台中的工匠错误
Listing of commands that i run
我运行的命令列表
composer create-project --prefer-dist laravel/laravel laravelDemo
which will create new folder laravelDemo
cd laravelDemo
php artisan migrate
composer create-project --prefer-dist laravel/laravel laravelDemo
这将创建新文件夹 laravelDemo
cd laravel 演示
php工匠迁移
I'm using Ubuntu 16.04
我正在使用Ubuntu 16.04
I have already checked possible duplicate answerbut i have installed it throw composer.
我已经检查了可能的重复答案,但我已经安装了它 throw composer。
Please help Thanks in Advance :)
请帮助提前致谢:)
采纳答案by Binit Ghetiya
Not figure out what actual problem is but what i did is deletedlaravelDemo folder and run above command and it worked.
不知道实际问题是什么,但我所做的是删除laravelDemo 文件夹并运行上面的命令并且它起作用了。
i have also tried composer update --no-scriptswhich will updated all the composer dependencies successfully.
May be there were some issue in installing the project.
我也试过composer update --no-scripts它将成功更新所有的 composer 依赖项。
可能是在安装项目时出现了一些问题。
回答by Darwin Tusarma Taba Emprendeco
check that the project contains the artisan file, it's a php.
检查项目是否包含工匠文件,它是一个 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);`
回答by Alexey
The problem is you type the command out of laravelDemo folder. please go into this folder by running: cd laravelDemo and try again.
问题是您从 laravelDemo 文件夹中键入命令。请运行以下命令进入此文件夹: cd laravelDemo 并重试。