我試圖構建一個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'並重試.. –