Laravel 迁移错误:找不到基表或视图

时间:2021-07-15 22:29:02

标签: php laravel laravel-migrations

我收到以下错误。我该如何解决?

<块引用>

未找到基表或视图:1146 表 'account_infos'

迁移

public function up()
{
    Schema::create('account_info', function (Blueprint $table) {
        $table->id();
        $table->unsignedBigInteger('users_id');
        $table->foreign('users_id')->references('id')
            ->on('users')->onDelete('cascade');
        $table->unsignedBigInteger('axis_id');
        $table->foreign('axis_id')->references('id')
            ->on('axis')->onDelete('cascade');
        $table->enum('account_type',['legal','rightful']);
        $table->timestamps();
    });
}

1 个答案:

答案 0 :(得分:2)

只需添加:

    protected $table='account_info';

在你的模型中

相关问题