You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Laravel project where my user table is named Users (with an uppercase "U"). I have already set the table name in my User model.
However, Laravel still tries to query the users table instead of Users, and I get this error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'template.users' doesn't exist (Connection: mysql, SQL: select count(*) as aggregate from users where email = admin@gmail.com)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Laravel project where my user table is named Users (with an uppercase "U"). I have already set the table name in my User model.

However, Laravel still tries to query the users table instead of Users, and I get this error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'template.users' doesn't exist (Connection: mysql, SQL: select count(*) as aggregate from users where email = admin@gmail.com)
Beta Was this translation helpful? Give feedback.
All reactions