我使用该命令启动了一个新项目。laravel^6.2laravel new myapp
然后编辑我的文件以连接到我的本地数据库:.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=8082
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=root
然后我决定从laravel默认数据库结构。当我说默认结构时,我说的是从文件开始就已经创建的迁移:migrateusers2014_10_12_000000_create_users_table.php
<?php
// *** This has been generated from `laravel new myapp` ***
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
所以我运行命令,然后发生了一些意想不到的事情。事实上,在那之后,终端不会做任何事情,就好像它正在休息一样。我想也许该命令需要一段时间才能执行,但是在持续了大约十分钟的几次尝试之后,没有任何反应。php artisan migrate
所以我决定查阅日志,但绝对没有写下任何东西,它完全是空的。
因此,我正在尝试执行并重新开始,但结果是相同的:没有错误消息,也没有发生任何事情。php artisan cache:clear
我知道这个问题以前在这里被问过,但没有真正提出答案。
有人知道我错过了什么吗?
慕工程0101907
暮色呼如
随时随地看视频慕课网APP