gpt4 book ai didi

php - Laravel 迁移错误 : Base table or view not found

转载 作者:行者123 更新时间:2023-12-04 07:22:40 26 4
gpt4 key购买 nike

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

Base table or view not found: 1146 Table '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();
});
}

最佳答案

只需添加:

    protected $table='account_info';
在你的模型中

关于php - Laravel 迁移错误 : Base table or view not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68401454/

26 4 0