2

I got the following error. How can I fix it?

Base table or view not found: 1146 Table 'account_infos'

Migration

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();
    });
}
Karl Hill
  • 12,937
  • 5
  • 58
  • 95

1 Answers1

4

Just add:

    protected $table='account_info';

in your model

Meysam Zandy
  • 296
  • 7
  • 18
  • 1
    He says the error is in migration, not Model. At least this is what he says! But I think you are right somehow, he does not know where he is facing the problem!! – Mohsen Nazari Jul 15 '21 at 22:35