Base table or view not found: Exception

Posted 11 months ago by Nagamma

Hi everyone,

In my application , I have created a model with name 'Invoice' and table with name 'invoice'. I am trying to get all records from invoice table.. my query is

$invoice=Invoice::all();

But , I am getting exception as follows

"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lara_relationships.invoices' doesn't exist (SQL: select * from invoices)"

Why it is throwing error with table name invoices ?

where as my table name is only invoice and trying to fetch values using Invoice Model .

Please help me .. Thank you inadvance

Please sign in or create an account to participate in this conversation.