Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

daniel21gt's avatar

Problem when running seeders laravel 5.5

I am currently migrating my project to a real hosting, so far everything is fine, the migrations were executed without problems, but at the time of executing the seeder I see this error.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'winnersc_asambles2019.Mayor' doesn't exist (SQL: insert into Mayor (mayor_candidate, updated_at, created_at) values (AlcaldeUno, 2019-05-10 01:27:21, 2019-0 5-10 01:27:21))

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'winnersc_asambles2019.Mayor' doesn't exist

I do not understand why, the table does exist, the migrations were correct, when I run them on my local server it goes without problems but in the hosting, no one knows why this?

my seeder

0 likes
5 replies
Nasmed's avatar

Maybe you're using custom table names, make sure you override $table property in your models.

    protected $table = 'custom_table_name'

Please or to participate in this conversation.