我试图构建一个laravel应用程序,我已经创建了所有的迁移文件。但是,当我试图运行Laravel:[PDOException] SQLSTATE [42S02]:找不到基表或视图
php artisan migrate
命令,我看到了以下错误:
[Illuminate\Database\QueryException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.users' does n't exist (SQL: select exists(select * from `users`) as `exists`) [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.users' does n't exist
我尝试更新的作曲家和迁移:回滚但同样的错误,我越来越每当我运行的命令。此外,也没有与.env文件的错误以及。我找不到错误,如果有人可以帮助我找到问题..谢谢。
这里是我的user表迁移文件:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
您是否创建了原子数据库? –
是的..我确实有一个名为atom的数据库 – Hola
运行命令'composer dump-autoload'并重试.. –