Base Table Or View Not Found: 1146 Table Laravel 5


Answer :

I'm guessing Laravel can't determine the plural form of the word you used for your table name.

Just specify your table in the model as such:

class Cotizacion extends Model{     public $table = "cotizacion"; 

Check your migration file, maybe you are using Schema::table, like this:

Schema::table('table_name', function ($table)  {     // ... }); 

If you want to create a new table you must use Schema::create:

Schema::create('table_name', function ($table)  {     // ... }); 

I faced this problem too in laravel 5.2 and if declaring the table name doesn't work,it is probably because you have some wrong declaration or mistake in validation code in Request (If you are using one)


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?