I am using Laravel 5 and have changed the name of a database table from "domain_related_settings" to "DomainRelatedSettings" by rolling back all migrations, changing the specific migration, and running them again. The new table name is reflected in the database.
But when i use the corresponding model DomainRelatedSetting
in a statement like this:
$domainSettings = DomainRelatedSetting::where('hostname', 'foo')->first();
it gives the following error:
SQLSTATE[42S02]: Base table or view not found:
1146 Table 'databasename.domain_related_settings' doesn't exist
(SQL: select * from `domain_related_settings` where `hostname` = foo limit 1)
So it is still using the old table name. How can I ensure the new table name is used?